Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Invoke method via reflection
//Title of this code //Rextester.Program.Main is the entry point for your code. Don't change it. using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; using System.Reflection; namespace Rextester { public class Program { public static void Main(string[] args) { var ob = new SomeClass(); MethodInfo method = ob.GetType().GetMethod("Do"); method.Invoke(ob, new object[] { }); } } public class SomeClass { public void Do() { Console.WriteLine("Do!"); } } }
run
|
edit
|
history
|
help
0
test
Intuit // C# // listing_4.2 (Converting / Parsing)
PayU Lu c#
Serialization
hh
test
asxasxdf
test
DateTime
Chris Kasongo Lazarius Mukengeshayi "Entelect BlackJack 21"