Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
C# version of VFP PEMSTATUS()
Message
 
 
To
18/01/2010 20:01:56
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
C# 2.0
Miscellaneous
Thread ID:
01444636
Message ID:
01444672
Views:
41
>>>
>>>Why you'd need it for methods I don't know as intellisense will tell you it doesn't exist and it won't compile without errors...
>>
>>The reason I started looking for this is due to a problem I ran into with Interface (see my message on Interface). Basically I want the OnTextChanged method of my Textbox base class that is used by many forms to call a certain method of a form if the form has the method. That is, not all forms will have this method but all forms will use this Textbox class as a base. So this is not at compile time but at run time.
>
>Any reason why the method has to belong to a form? If so, then you might look at Type.GetMethods():
>
>http://www.csharp-examples.net/get-method-names/
>http://msdn.microsoft.com/en-us/library/4d848zkb.aspx

First, thank you for the link. You have given me (and I thank you) enough informatiot to stay up all night <g>.

As to why method has to belong to a form. I don't know (can't see) where else this method would belong. That is, I add/create a method in the form that enabled/disables certain buttons. At run time the code in each text box event OnTextChange needs to "know" if this (parent) form class has this method or not. So in the OnTextChanged method I need to determine (at run time) if the form class has this method.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform