Imagine I have the following class:
class Cow {
public static bool TryParse(string s, out Cow cow) {
...
}
}
Is it possible to call TryParse
via reflection? I know the basics:
var type = typeof(Cow);
var tryParse = type.GetMethod("TryParse");
var toParse = "...";
var result = (bool)tryParse.Invoke(null, /* what are the args? */);