I’m generating a T4 template using the properties of my data class generated from my dbml files. To get the property type of the classes I use item.PropertyType.Name, the problem is that with nullable types it returns Nullable “1, is there a way to getNullablefor example, orint?`?
I’m generating a T4 template using the properties of my data class generated from
Share
GetGenericArguments is the method you want.
On second thought though, Darren’s answer is much simpler in this case as it will return null when you pass in a non-nullable type.