Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

NonPublic Method Invocation - Part #3

By: a guest on Jan 5th, 2012  |  syntax: C#  |  size: 0.46 KB  |  views: 186  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. // Program.cs
  2.  
  3. namespace Reflection
  4. {
  5.     using System;
  6.     using System.Reflection;
  7.  
  8.     class Program
  9.     {
  10.         static void Main(string[] args)
  11.         {
  12.             Invoker invoker = new Invoker();
  13.             SomeClass someClass = new SomeClass(invoker);
  14.  
  15.             foreach (string result in invoker.GetResults())
  16.             {
  17.                 Console.WriteLine(result);
  18.             }
  19.  
  20.             Console.ReadKey();
  21.         }
  22.     }
  23. }