I may not have it correct, but I saw something like this above a WebMethod:
[return:(XmlElement("Class2"),IsNullable = false)]
public Class2 MEthod1()
{
}
I saw a vb version first and I used a converter to convert it to c#. I have never seen it before. It’s in a vb 6 asmx file.
It’s an attribute target, and it’s being used in your example to disambiguate usage on the return value from other elements:
When creating attributes you can specify which language elements an attribute can be applied to. This is illustrated in the example below.
For a list of available targets see here:
http://msdn.microsoft.com/en-us/library/system.attributetargets.aspx