Skip to content

Instantly share code, notes, and snippets.

@guntidheerajkumar
Created August 4, 2016 09:47
Show Gist options
  • Save guntidheerajkumar/8728a472a50103d54bb5cabaf37cda73 to your computer and use it in GitHub Desktop.
Save guntidheerajkumar/8728a472a50103d54bb5cabaf37cda73 to your computer and use it in GitHub Desktop.
/// 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