MethodHandle From C#

Posted by: IKVM.NET Weblog, on 08 Aug 2011 | View original | Bookmarked: 0 time(s)

using java.lang.invoke;classProgram { static void Main() { MethodType mt = MethodType.methodType(typeof(void), typeof(string), typeof(object[])); MethodHandle mh = MethodHandles.lookup().findStatic(typeof(System.Console), "WriteLine", mt); mh.invoke("{0} {1}", "Hello", "World"); } } This now works, but it is not very efficient. Invoking a MethodHandle from Java is more efficient, because the call site signature is statically known in that...

Category: C# | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 920 | Hits: 59

Similar Posts

  • MethodHandle Progress more
  • WPF Styles: Triggers more

News Categories

.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Data | DataGrid | DataSet | Debugger | DotNetNuke | Events | GridView | IIS | Indigo | JavaScript | Mobile | Mono | Patterns and Practices | Performance | Podcast | Refactor | Regex | Security | Sharepoint | Silverlight | Smart Client Applications | Software | SQL | VB.NET | Visual Studio | W3 | WCF | WinFx | WPF | WSE | XAML | XLinq | XML | XSD