Skip to content

Instantly share code, notes, and snippets.

@AlexArchive
Created June 22, 2013 06:38
Show Gist options
  • Save AlexArchive/5836114 to your computer and use it in GitHub Desktop.
Save AlexArchive/5836114 to your computer and use it in GitHub Desktop.
Delegate "proxy" to Convert.ToInt32(char value)
Public Delegate Function ToInt32Proxy(ByVal value As Char) As Integer
..
Dim someDelegate =
[Delegate].CreateDelegate(GetType(ToInt32Proxy), GetType(Convert).GetMethod("ToInt32", New Type() {GetType(Char)}))
Dim someProxy = DirectCast(someDelegate, ToInt32Proxy)
Dim someValue = someProxy("a")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment