Skip to main content
Home Forums Silverlight Programming Accessing Web Services with Silverlight A Service with CONST parameter and some functions
1 replies. Latest Post by Min-Hong Tang - MSFT on November 10, 2009.
(0)
royal_blue
Member
214 points
47 Posts
11-05-2009 5:10 AM |
I have a class in a Silverlight enabled WCF Service.
I can access this class and [DataMember] parameters.
But I can't access CONST parameters and Methods in class on client side.
How can I do? (Sory my bad english)
[DataContract]public class UserItem{ [DataMember] public Guid SessionID { get; set; } [DataMember] public string Username { get; set; } ... ... ... public const int A_CONST_PARAMETER_1 = 1; public const int A_CONST_PARAMETER_2 = 2; ... ... public bool SomeMethod(int param) { ... ... }}
Min-Hong...
Contributor
3566 points
402 Posts
11-10-2009 3:46 AM |
Hi,
I am afraid The DataMemberAttribute is ignored if it is applied to static members. This is quoted from msdn document. This is the link:
http://msdn.microsoft.com/en-us/library/ms733127.aspx
You can share with us the situation you are dealing with , in that case, maybe we can find some workarounds for you.
Best Regards