using System;
using System.Data;
using System.Data.SqlClient;
using System.Data.SqlTypes;
using Microsoft.SqlServer.Server;
using System.Runtime.InteropServices;
using System.Xml.Serialization;
[Serializable]
[Microsoft.SqlServer.Server.SqlUserDefinedType(Format.Native)]
[StructLayout(LayoutKind.Sequential)]
[XmlSerializerAssemblyAttribute(AssemblyName = "TrivialUDT.XMLSerializers, version=0.0.0.0, culture=neutral, publickeytoken=null, processorarchitecture=msil")]
public struct TrivialUDT : INullable
{
    public override string ToString()
    {
        // Replace the following code with your code
        return var1.ToString();
    }

    public bool IsNull
    {
        get
        {
            // Put your code here
            return m_Null;
        }
    }

    public static TrivialUDT Null
    {
        get
        {
            TrivialUDT h = new TrivialUDT();
            h.m_Null = true;
            return h;
        }
    }

    public static TrivialUDT Parse(SqlString s)
    {
        if (s.IsNull)
            return Null;
        TrivialUDT u = new TrivialUDT();
        u.var1 = Int32.Parse(s.Value);
        return u;
    }

    // This is a place-holder method
    public string Method1()
    {
        //Insert method code here
        return "Hello";
    }

    // This is a place-holder static method
    public static SqlString Method2()
    {
        //Insert method code here
        return new SqlString("Hello");
    }

    // This is a place-holder field member
    public int var1;
    // Private member
    private bool m_Null;
}


