ExtensionsConvertionsAs Method (Object, Type, Type) |
Namespace: Cauldron
public class Bla { public string Value { get; set; } public static implicit operator Bla(string value) => new Bla { Value = value }; public static implicit operator Bla(int value) => new Bla { Value = value.ToString() }; }
var bar = "Test Test".As(typeof(string), typeof(Bla));