A
almurph
Hi everyone,
I'm wondering can you help me understanding some C# syntax.
1. What does the this do? specifically the <string> thingy?
List<string> keys = new List<string>();
2. When you preceed a class with "[Serializable()]" - what does it
mean/do?:
[Serializable()]
public class myclass : ISerializable
{
//implementation
}
3. Brackes around a "Cannot implicitely convert SomeWrapperClass to
SomeWrapperClass[] - what does this do?
I get a "cannot implicitly convert SomeWrapperClass to
SomeWrapperClass[]" from the following line of code:
SomeWrapperClass[] parameters = { new SomeWrapperClass("@itemValue",
itemKey) };
however when I put braces around it, it works:
SomeWrapperClass[] parameters = { new SomeWrapperClass("@itemValue",
itemKey) };
Does the placing of brackets around something allow implicit
conversions or something?
Any comments/suggestions/explanations of the above much appreciated.
Thanks,
Al.
I'm wondering can you help me understanding some C# syntax.
1. What does the this do? specifically the <string> thingy?
List<string> keys = new List<string>();
2. When you preceed a class with "[Serializable()]" - what does it
mean/do?:
[Serializable()]
public class myclass : ISerializable
{
//implementation
}
3. Brackes around a "Cannot implicitely convert SomeWrapperClass to
SomeWrapperClass[] - what does this do?
I get a "cannot implicitly convert SomeWrapperClass to
SomeWrapperClass[]" from the following line of code:
SomeWrapperClass[] parameters = { new SomeWrapperClass("@itemValue",
itemKey) };
however when I put braces around it, it works:
SomeWrapperClass[] parameters = { new SomeWrapperClass("@itemValue",
itemKey) };
Does the placing of brackets around something allow implicit
conversions or something?
Any comments/suggestions/explanations of the above much appreciated.
Thanks,
Al.