Passing just a type as a parameter in C#
There are two common approaches. First, you can pass System.Type This would be called like: int val = (int)GetColumnValue(columnName, typeof(int)); The other option would be to use generics: This has the advantage of avoiding the boxing and pr