[DataContract]
public class Credentials
{
[DataMember]
public string UserName {get;set;}
public string Password {get;set;}
}
[DataContract]
public class User
{
[DataMember]
public Credentials Credentials {get;set;}
}
In the above scenario, since Credentials is decorated with the DataMember attribute, is it necessary to decorate the Credentials class with DataContract and it's members with the DataMember attribute?