| **Navigation:**  T4 Template Language Reference > [[t4 syntax.htm|Directives]] >GlobalStatementBlocks | [[template helper blocks.htm|{{btn_prev_n.gif|Previous page}}]][[t4 syntax.htm|{{btn_home_n.gif|Return to chapter overview}}]][[writing and debugging.htm|{{btn_next_n.gif|Next page}}]] | | || GlobalStatementBlocks <;#* #> Example: <;#* public partial class Global { public static string ToNETType(SoftVelocity.DataDictionary.Design.IColumn column) { string returnValue; switch (column.DataType) { case SoftVelocity.DataDictionary.Design.FieldType.DATE_TIME: returnValue = "DateTime"; break; case SoftVelocity.DataDictionary.Design.FieldType.BYTE: returnValue = "byte"; break; case SoftVelocity.DataDictionary.Design.FieldType.SHORT: returnValue = "Int16"; break; case SoftVelocity.DataDictionary.Design.FieldType.USHORT: returnValue = "UInt16"; break; case SoftVelocity.DataDictionary.Design.FieldType.DATE: returnValue = "DateTime"; break; case SoftVelocity.DataDictionary.Design.FieldType.TIME: returnValue = "DateTime"; break; case SoftVelocity.DataDictionary.Design.FieldType.LONG: returnValue = "Int32"; break; case SoftVelocity.DataDictionary.Design.FieldType.ULONG: returnValue = "UInt32"; break; case SoftVelocity.DataDictionary.Design.FieldType.SREAL: returnValue = "System.Single"; break; case SoftVelocity.DataDictionary.Design.FieldType.REAL: returnValue = "double"; break; case SoftVelocity.DataDictionary.Design.FieldType.DECIMAL: returnValue = "decimal"; break; case SoftVelocity.DataDictionary.Design.FieldType.PDECIMAL: returnValue = "decimal"; break; case SoftVelocity.DataDictionary.Design.FieldType.SBYTE: returnValue = "sbyte"; break; case SoftVelocity.DataDictionary.Design.FieldType.BFLOAT4: returnValue = "System.Single"; break; case SoftVelocity.DataDictionary.Design.FieldType.BFLOAT8: returnValue = "double"; break; case SoftVelocity.DataDictionary.Design.FieldType.SIGNED: returnValue = "int"; break; case SoftVelocity.DataDictionary.Design.FieldType.UNSIGNED: returnValue = "uint"; break; case SoftVelocity.DataDictionary.Design.FieldType.STRING: returnValue = "string"; break; case SoftVelocity.DataDictionary.Design.FieldType.CSTRING: returnValue = "string"; break; case SoftVelocity.DataDictionary.Design.FieldType.PSTRING: returnValue = "string"; break; default: returnValue = string.Format("Unmatched type error {0}", column.DataType.ToString()); break; } return returnValue; } } #>