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

Visual Basic

 
AnswerRe: automatic key generation for database Pin
Mycroft Holmes21-May-09 22:19
professionalMycroft Holmes21-May-09 22:19 
GeneralRe: automatic key generation for database Pin
hrishiS21-May-09 22:29
hrishiS21-May-09 22:29 
GeneralRe: automatic key generation for database Pin
Mycroft Holmes21-May-09 23:40
professionalMycroft Holmes21-May-09 23:40 
GeneralRe: automatic key generation for database Pin
Dave Kreskowiak22-May-09 3:42
mveDave Kreskowiak22-May-09 3:42 
GeneralRe: automatic key generation for database Pin
Eddy Vluggen23-May-09 8:38
professionalEddy Vluggen23-May-09 8:38 
GeneralRe: automatic key generation for database Pin
DidiKunz23-May-09 11:15
DidiKunz23-May-09 11:15 
QuestionHttpWebRequest/HttpWebResponse Execution Problem Pin
AliAmjad21-May-09 18:09
AliAmjad21-May-09 18:09 
QuestionIs there an easy way to execute a method for every Sub & Function that runs? [modified] Pin
sephus621-May-09 12:19
sephus621-May-09 12:19 
I have some logging code that I'd like to run for every sub and function, but I don't want to have to put a line of code in every single sub and function manually.

Is there an easy way to do this so the code runs for every sub/function called?

Also, I'm limited to using the 1.1 framework.

Example:
Public Class Class1
    Public Sub LogSomeInfo(ByVal sMethodName As String)
        'do something
    End Sub

    Public Function Test1() As String
        'This is the call I'd like to run for every sub/function
        LogSomeInfo(System.Reflection.MethodBase.GetCurrentMethod.Name)

        'do something
    End Function

    Public Sub Test2()
        'This is the call I'd like to run for every sub/function
        LogSomeInfo(System.Reflection.MethodBase.GetCurrentMethod.Name)

        'do something
    End Sub
End Class


modified on Thursday, May 21, 2009 6:44 PM

AnswerRe: Is there an easy way to execute a method for every Sub & Function that runs? Pin
Luc Pattyn21-May-09 12:54
sitebuilderLuc Pattyn21-May-09 12:54 
GeneralRe: Is there an easy way to execute a method for every Sub & Function that runs? Pin
sephus621-May-09 18:53
sephus621-May-09 18:53 
GeneralRe: Is there an easy way to execute a method for every Sub & Function that runs? Pin
Luc Pattyn22-May-09 1:29
sitebuilderLuc Pattyn22-May-09 1:29 
GeneralRe: Is there an easy way to execute a method for every Sub & Function that runs? Pin
sephus622-May-09 4:38
sephus622-May-09 4:38 
QuestionCondition..! [modified] Pin
Jamal Abdul Nasir21-May-09 10:12
Jamal Abdul Nasir21-May-09 10:12 
AnswerRe: Condition..! Pin
EliottA21-May-09 11:17
EliottA21-May-09 11:17 
GeneralRe: Condition..! Pin
Mycroft Holmes21-May-09 22:22
professionalMycroft Holmes21-May-09 22:22 
GeneralRe: Condition..! Pin
Jamal Abdul Nasir22-May-09 2:52
Jamal Abdul Nasir22-May-09 2:52 
GeneralRe: Condition..! Pin
EliottA22-May-09 4:06
EliottA22-May-09 4:06 
AnswerRe: Condition..! Pin
0x3c021-May-09 21:37
0x3c021-May-09 21:37 
GeneralRe: Condition..! Pin
Jamal Abdul Nasir22-May-09 2:54
Jamal Abdul Nasir22-May-09 2:54 
AnswerRe: Condition..! Pin
Samir Ibrahim22-May-09 1:00
Samir Ibrahim22-May-09 1:00 
GeneralRe: Condition..! Pin
Jamal Abdul Nasir22-May-09 2:51
Jamal Abdul Nasir22-May-09 2:51 
GeneralRe: Condition..! Pin
Mycroft Holmes22-May-09 3:07
professionalMycroft Holmes22-May-09 3:07 
GeneralRe: Condition..! Pin
Samir Ibrahim22-May-09 4:51
Samir Ibrahim22-May-09 4:51 
QuestionI try to create an array of objects from a class but I get Object reference not set to an instance of an object. Pin
nico200721-May-09 6:07
nico200721-May-09 6:07 
AnswerRe: I try to create an array of objects from a class but I get Object reference not set to an instance of an object. Pin
Dave Kreskowiak21-May-09 6:48
mveDave Kreskowiak21-May-09 6:48 

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.