/ Published in: C#
Enables to convert types using generics. Simple and clean.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
public class GenericConverter { public static T Parse<T>(string sourceValue) where T : IConvertible { } public static T Parse<T>(string sourceValue, IFormatProvider provider) where T : IConvertible { } }