hello

I'm using [Serializable] for my class (i.e. not labeled wih [DataContract] ---> seems like [IgnoreDataMember] is ignored?

[Serializable] *** Not [DataContract]
public class A : ISerializable
{

...
[IgnoreDataMember()]
List<T> lstNames;
...
}



I called service which return A. The reason why I think IgnoreDataMember was not applied is because from SvcTraceViewer I get this message:

Type 'System.Collections.Generic.List`1
[[System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]' with data contract name 'ArrayOfstring:http://schemas.microsoft.com/2003/10...ization/Arrays' is not expected. Add any types not known statically to the list of known types - for example, by using the KnownTypeAttribute attribute or by adding them to the list of known types passed to DataContractSerializer.


I need to "Ignore" the property and I've tried "IgnoreDataMember" as well as "XmlIgnore", can't get pass this. Is it because [KnownType("GetKnownType")] attribute is also ignored when you use [Serializable] instead of [DataContract] attribute?

Thanks