Created
August 4, 2016 09:47
-
-
Save guntidheerajkumar/8728a472a50103d54bb5cabaf37cda73 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// Using Reflection | |
StringBuilder sb = new StringBuilder(); | |
sb.GetType().InvokeMember("AppendLine", BindingFlags.InvokeMethod, null, sb, new object[] { "Hello World!!!!" }); | |
/// Using Dynamic CSharp | |
StringBuilder sb = new StringBuilder(); | |
((dynamic)sb).AppendLine("Hello World from Dynamic!!!!"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment