tags:

views:

80

answers:

3

I'm trying to create a POCO object called Friend.cs. I can't seem to create inline properties for the IList.

public class User
    {
        public string ID { get; set; }
        public string Name { get; set; }
        public string Rating { get; set; }
        public string Photo { get; set; }
        public string Reputation { get; set; }
        public string Group { get; set; }
        public string GroupColor { get; set; }
        public string PostCount { get; set; }
        public string PostPerDay { get; set; }
        public string JoinDate { get; set; }
        public string Views { get; set; }
        public string LastActive { get; set; }
        public string Title { get; set; }
        public string Age { get; set; }
        public string Birthday { get; set; }
        public string Sex { get; set; }
        public string LinkedIn { get; set; }
        public string Facebook { get; set; }
        public string Twitter { get; set; }
        public IList<Friend> {get???
}

Thanks for the help!

+6  A: 

You forget the name of the property:

public IList<Friend> Friends {get; set;}

should work.

Mau
Time for a break; how could I forget that! :[
Sergio Tapia
+3  A: 

Your missing the property name

ie

Public IList<Friend> Friends { get; set; }
w69rdy
+1  A: 
public class User
{
    public IList<Friend> Friends
    {
        get { return _friends; }
        set { _friends = new List<Friend>(value); }
    }

    private List<Friend> _friends;
}
Tergiver