public CustomObject(int number, string text)
public static explicit operator int(CustomObject o)
public static explicit operator string(CustomObject o)
public static void Main()
var obj = new CustomObject(12, "hello");
var theNumber = (int)obj;
var theText = (string)obj;
Console.WriteLine("Number: " + theNumber);
Console.WriteLine("Text: " + theText);