datamember
Is the DataMember IsRequired attribute in combination with a Nullable type contradictory?
I came across this today in a WCF contract: [DataMember开发者_开发百科(IsRequired = true)] public DateTime? LastModified { get; set; }[详细]
2023-04-13 04:34 分类:问答CollectionDataContract serialization not adding custom properties (DataMember)
We have a legacy system that needs to be fed (XML) data in a most unstructured format. Is the following even possible with the .NET DataContractSerializer?[详细]
2023-04-06 05:31 分类:问答Custom DataMember names to deserialize a JSON class
I cannot manage to specify custom names for properties. I receive som开发者_运维百科e JSON from the server (which I cannot change) with some ugly property names. I\'d like the C# code to stick to nami[详细]
2023-04-04 01:25 分类:问答Is it appropriate to declare a non-static constant data member inside a class while coding?
data member inside a class can be const but only if its static. otherwise we 开发者_高级运维need to have a constructor to initialize a constant inside a class.[详细]
2023-03-23 15:38 分类:问答What can a 'const' method change?
C++ methods allow a const qualifier to indicate that the object is not changed by the method. But what does that mean? Eg. if the instance variables are pointers, does it mean that the pointers are no[详细]
2023-03-23 05:07 分类:问答WCF Serialization Information outside class definition
Suppose this simple scenario: My client has an already working .net application and he/she 开发者_StackOverflowwants to expose some functionality through WCF. So he gives me an assembly, containg a pu[详细]
2023-03-12 14:03 分类:问答WCF Deserialization resets DataMember value to default after OnDeserializing callback
I have developed a WCF Service Application hosted in IIS 7.5 targeting .NET 3.5 configured with only a basicHttpBinding endpoint. The OperationContract signature consists of a Composite type where one[详细]
2023-03-09 18:49 分类:问答WCF and [DATACONTRACT]+[DATAMEMBER]
I was wondering how to add the DataContract to my service? I mean, I know I have to create a class, put [DATACONTRACT] on top of it and then add [DATAMEMBER] on top of each members, but then how to ad[详细]
2023-03-08 05:30 分类:问答DataMember vs DataMemberAttribute
[DataContract] public class SearchResults { [DataMember] public List<SearchDetail> PList { get; set; }[详细]
2023-03-06 11:54 分类:问答Can I get DataMember names in the code?
in one project, I use datamember to serialize a class to an xml file, like, [DataMember] public string Member1;[详细]
2023-03-05 13:06 分类:问答