Passing Generic class of type Enum fails in WCF(SOAP)

Please report bugs here. If you are unsure whether something is a bug or an expected behavior, please post it on the "Technical Support" forum instead, and wait for a moderator to handle/move the post.
mikeda
Posts: 8
Joined: Sun Jan 03, 2016 3:20 pm

Passing Generic class of type Enum fails in WCF(SOAP)

Postby mikeda » Mon Jan 11, 2016 5:22 pm

Hi,

If generic class includes empty initialized string data member(string unit),
Exception is thrown in JavaScript run time.
if unit is initialized non empty value, it works fine.

Code: Select all

[DataContract]
    public class CompositeType<T> where T : struct
    {
        T val;
        [DataMember]
        public T Value {
            get { return val; }
            set { val = value; }
        }
        string unit = string.Empty;
        [DataMember]
        public string Unit { get { return unit; } set { unit = value; } }
    }
   
Attachments
Solution1.zip
(5.86 MiB) Downloaded 400 times

Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 30 guests