Click here to Skip to main content
15,914,111 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Select item from datagridviewcomboboxcell Pin
phil.o13-Jun-11 11:46
professionalphil.o13-Jun-11 11:46 
Questioncopy file in vb.net Pin
faravani8-Jun-11 23:06
faravani8-Jun-11 23:06 
AnswerRe: copy file in vb.net Pin
Eddy Vluggen9-Jun-11 0:59
professionalEddy Vluggen9-Jun-11 0:59 
GeneralRe: copy file in vb.net Pin
Wayne Gaylard9-Jun-11 1:33
professionalWayne Gaylard9-Jun-11 1:33 
GeneralRe: copy file in vb.net Pin
Smithers-Jones9-Jun-11 3:31
Smithers-Jones9-Jun-11 3:31 
GeneralRe: copy file in vb.net Pin
Eddy Vluggen9-Jun-11 4:54
professionalEddy Vluggen9-Jun-11 4:54 
QuestionReflection: Get Subclass Type [modified] Pin
KenBonny8-Jun-11 3:12
KenBonny8-Jun-11 3:12 
AnswerRe: Reflection: Get Subclass Type Pin
Eddy Vluggen8-Jun-11 3:33
professionalEddy Vluggen8-Jun-11 3:33 
Hope this helps;
VB.NET
Class Base
  Public Function GetClassName() As String
    Return System.Reflection.MethodBase.GetCurrentMethod().ReflectedType.Name.ToLower()
  End Function
  Public Function GetCallingMethodName() As String
    Return New StackTrace().GetFrame(1).GetMethod().Name
  End Function
  Public Function GetMethodName() As String
    Return New StackTrace().GetFrame(0).GetMethod().Name
  End Function
End Class

Class SubClass ' "Sub" is a reserved word and hence not a good idea as a classname
  Inherits Base

  ' Some unrelated code
End Class

Module Module1
  Sub main()
    Dim s As New SubClass
    Console.WriteLine(s.GetClassName()) ' prints the classname
    Console.WriteLine(s.GetCallingMethodName()) ' prints the methodname (main)
    Console.WriteLine(s.GetMethodName()) ' prints the methodname that's currently executed
    Console.ReadKey()
  End Sub
End Module

Bastard Programmer from Hell Suspicious | :suss:

GeneralRe: Reflection: Get Subclass Type Pin
KenBonny8-Jun-11 3:59
KenBonny8-Jun-11 3:59 
AnswerRe: Reflection: Get Subclass Type Pin
Luc Pattyn8-Jun-11 3:45
sitebuilderLuc Pattyn8-Jun-11 3:45 
GeneralRe: Reflection: Get Subclass Type Pin
KenBonny8-Jun-11 4:00
KenBonny8-Jun-11 4:00 
QuestionVB Deployment - Automatically run an exe file Pin
Central_IT7-Jun-11 5:00
Central_IT7-Jun-11 5:00 
AnswerRe: VB Deployment - Automatically run an exe file Pin
Dave Kreskowiak7-Jun-11 8:06
mveDave Kreskowiak7-Jun-11 8:06 
AnswerRe: VB Deployment - Automatically run an exe file Pin
thatraja7-Jun-11 9:53
professionalthatraja7-Jun-11 9:53 
QuestionEmail Program [modified] Pin
Uma Kameswari7-Jun-11 2:05
Uma Kameswari7-Jun-11 2:05 
GeneralRe: Email Program Pin
thatraja7-Jun-11 2:27
professionalthatraja7-Jun-11 2:27 
GeneralRe: Email Program Pin
Uma Kameswari7-Jun-11 2:35
Uma Kameswari7-Jun-11 2:35 
GeneralRe: Email Program Pin
Richard MacCutchan7-Jun-11 3:13
mveRichard MacCutchan7-Jun-11 3:13 
GeneralRe: Email Program Pin
Uma Kameswari7-Jun-11 3:20
Uma Kameswari7-Jun-11 3:20 
GeneralRe: Email Program Pin
Richard MacCutchan7-Jun-11 3:30
mveRichard MacCutchan7-Jun-11 3:30 
GeneralRe: Email Program Pin
Uma Kameswari7-Jun-11 3:38
Uma Kameswari7-Jun-11 3:38 
GeneralRe: Email Program Pin
Richard MacCutchan7-Jun-11 5:03
mveRichard MacCutchan7-Jun-11 5:03 
GeneralRe: Email Program Pin
Johan Hakkesteegt13-Jun-11 22:37
Johan Hakkesteegt13-Jun-11 22:37 
GeneralRe: Email Program Pin
Uma Kameswari13-Jun-11 22:53
Uma Kameswari13-Jun-11 22:53 
GeneralRe: Email Program Pin
Johan Hakkesteegt13-Jun-11 23:15
Johan Hakkesteegt13-Jun-11 23:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.