Quantcast
Channel: Programming (In-game)
Viewing all articles
Browse latest Browse all 903

checking the type of a property

$
0
0
I would like to know how to check what the type of a property is befor I acquire it.

basicly I would like to do this

string _requestedValue = property.Id
if(if propertyType = single)
_block.GetValue<single>(_requestedValue);
else if (propertyType = bool)
_block.GetValue<bool>(_requestedValue);

I would just like the program to be able to determine whether it needs to use GetValue<single> or GetValue<bool>

any help would be much appreciated.

Viewing all articles
Browse latest Browse all 903

Trending Articles