✅ Convert from string to Type?
How do I get that
ConvertToType(this string) function? I believe it should be possible.ConvertToType(this string)public class Foo
{
public string MyTypeInString = "Foo";
}
public static class SomeFunctions
{
public static MyFunction<T>(T input)
{
//
}
}
public class Program
{
public static void Main()
{
Foo f = new();
SomeFunctions.MyFunction<f.MyTypeInString.ConvertToType()>(f);
}
}