Saiyine
Punto Com

Know who is calling your Visual Basic code at runtime

2010-12-18 04:20:20

The other day I found what I think is the easiest way to know who is calling a Visual Basic Dot Net method in your code at run time.

Sub Caller()
  Call Callee()
End Sub

Sub Callee()
  Dim trace As New StackTrace(True)
  Console.WriteLine(trace.GetFrame(1).GetMethod.Name )
  ' Writes "Caller" to the console window
End Sub

It strikes me as is incredibly similar to the way you do it in Java.

Rollos antiguos

2010-12-16 14:59:48 - Las joyas de la corona.

2010-12-13 16:00:43 - Caracteres raros en Putty.

2010-12-01 15:25:59 - Mire donde mire, todo me recuerda a ella.

2010-11-27 16:58:32 - Aplicaciones crm y erp para empresas con Aitana.

2010-11-08 15:19:31 - Presume de Sexta, amigo.

Saiyine

Selfie of meHi! Welcome to Saiyine Punto Com where I talk about anything that goes through my mind!

Puedo prometer y prometo que a la mayor brevedad aquí irá un menú o algo asín.