Luuk
2015-11-28 14:44:56 UTC
I am trying to create a webservice, so i starten Visual Studio 2015,
choose new Project, and picked 'WCF Service Application'
This seems to work, but examining the code, i see in IService.cs that
stringValue is initted with the value "Hello"
I do not see this value anywhere being used, can someone explain why
this initialization is done?
// Use a data contract as illustrated in the sample below to add
composite types to service operations.
[DataContract]
public class CompositeType
{
bool boolValue = true;
string stringValue = "Hello ";
[DataMember]
public bool BoolValue
{
get { return boolValue; }
set { boolValue = value; }
}
[DataMember]
public string StringValue
{
get { return stringValue; }
set { stringValue = value; }
}
}
choose new Project, and picked 'WCF Service Application'
This seems to work, but examining the code, i see in IService.cs that
stringValue is initted with the value "Hello"
I do not see this value anywhere being used, can someone explain why
this initialization is done?
// Use a data contract as illustrated in the sample below to add
composite types to service operations.
[DataContract]
public class CompositeType
{
bool boolValue = true;
string stringValue = "Hello ";
[DataMember]
public bool BoolValue
{
get { return boolValue; }
set { boolValue = value; }
}
[DataMember]
public string StringValue
{
get { return stringValue; }
set { stringValue = value; }
}
}