how to define a class of C# that can be created in SQLServer Yukon as a UDT?

  • Thread starter Thread starter xum
  • Start date Start date
X

xum

i create a c# class ,but when i create it in sqlserver yukon:

create type test external name test:[WhidbeyTest.Point]
has a error:
Create Type: Type 'WhidbeyTest.Point' does not conform to UDT specification
due to method 'Parse'.

C# code:

[SqlUserDefinedType(Format.SerializedDataWithMetadata,MaxByteSize = 8000)]
[SerializableAttribute]
public class Point :
{
public Point() { }
public int X;
public int Y;
public override string ToString(){
return X.ToString() + "," + Y.ToString();
}
}

please help me! thanks!!!
 
Nevermind...i completely missread the error.

Is the : after 'public class Point' something new to Yukon?
 
Back
Top