|
See this[^] tutorial.
/ravi
|
|
|
|
|
Reflection allows you to look at compiled .NET classes and assemblies and discover their classes and members (fields, properties, methods and events). Once discovered you can interact with these members, such as assigning values to properties etc.
It is unusual to use reflection in everyday programming. However if you were creating developer tools you may see a use for reflection.
Some classic examples where reflection is used include unit testing, documentation creation and code validation.
Reflection can also discover attributes. If you're familiar with XmlSerialization, reflection is used to read the attributes to determine which fields to serialize and which to ignore.
Others have given links for more information.
"You get that on the big jobs."
|
|
|
|
|
RobCroll wrote: It is unusual to use reflection in everyday programming
Really? Reflection is generally not known to be fast, but it can be of enormous help in many situations if used sparingly. These are my most recent examples:
I am working on my own UI and there are style objects which follow the class hierarchy of the controls. When loading a control the closest related style is found with reflection and applied to the control, even if it's a custom control with no custom style class. In that case the style of the control's baseclass is found and applied.
Also, a kind of class finder is used to decouble modules and assemblies to find specific classes and create instances of them. It uses reflection to search through the assemblies for the requested type. Let's say I'm looking for ILoginPresenter and ILoginView in order to open the application's login screen. Obtaining instances of those two would not require tightly coupled assemblies or classes. The only dependencies would be the interfaces involved.
I'm invincible, I can't be vinced
|
|
|
|
|
|
hey guys,.. i am doing my mini project in c# windows form application .. in that i used a label l in form.when
l.Text= "&";
its not showing anything on form inplace of label.
Can anyone knows solution for it??
modified 29-Mar-12 13:17pm.
|
|
|
|
|
You can try a couple of things.
(Note: I haven't tried them to make sure they all work. I just thought I'd throw out the ideas for you.)
a.Text = @"&";
a.Text = "\&";
a.Text = "& # 3 8;";
a.Text = &
I wasn't, now I am, then I won't be anymore.
|
|
|
|
|
sorry, my fault.. actually i have asked wrong question.. i have updated my question.. can u pls answer for it.. ??
thank u
|
|
|
|
|
Strange. I copy/pasted your code bit. And MessageBox displays the '&'. What version of Windows, maybe?
djj55: Nice but may have a permission problem
Pete O'Hanlon: He has my permission to run it.
|
|
|
|
|
sorry, my fault.. actually i have asked wrong question.. i have updated my question.. can u pls answer for it.. ??
thank u
|
|
|
|
|
Oh, that is because the & symbol, when used in text on certain controls (i.e. buttons, menus, labels), the following character has a Mnemonic beneath it. In the designer (or in code), set the "UseMnemonic" property of the label control to 'false'.
djj55: Nice but may have a permission problem
Pete O'Hanlon: He has my permission to run it.
|
|
|
|
|
thnk u.. its working now..
can u tell me other text exmples which have this mnemonic beneath??
|
|
|
|
|
Anything which can take focus from an Alt+X keystroke. That is buttons, labels, menus and menu items, radio and check box buttons, groups (I think), toolbar equivalents and possibly also grid view inner control equivalents (not sure about that), off the top of my head.
|
|
|
|
|
And, I think, just putting it in as && will make it show up.
|
|
|
|
|
I think the && would, too, thanks for adding the idea. It seems like it wouldn't matter in this case but if he is actually using the mnemonics in the application it would add the line beneath the '&' that is printed on the control. Not sure if it would be a problem but it is possible.
djj55: Nice but may have a permission problem
Pete O'Hanlon: He has my permission to run it.
|
|
|
|
|
how can we shutdown using button
|
|
|
|
|
Push it
Failure is not an option; it's the default selection.
|
|
|
|
|
|
Push it real good
Failure is not an option; it's the default selection.
|
|
|
|
|
See this[^] article.
/ravi
|
|
|
|
|
I build up the contents of my "Page-Specific Content" dynamic in C #. My <asp:ContentPlaceHolder is growing and growing, but the Web browser shows no scrollbars and therefore I cannot see the final data. I have tried different browsers, but all have the same problem.
Question: how can I get scrollbars for the whole page as it grows dynamically?
|
|
|
|
|
You'll want to use the developer tools of the browser. overflow: auto will usually make it scroll but you have to look at what is getting generated.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Can somebody help me with something related to voice print recognition or at least some tips on recording the singnal from the microfon and save it to a .wav file, in order to apply after that a Fast Fourier Transform on the .wav file to try to extract some patterns that could help for the voice print recognition.
I hope I was clear enough in my request.
Thank you.
|
|
|
|
|
Ambitious...
Good luck! Keep in mind that the "print" you extract can vary from the same person. If the person registers with a normal voice, then tries to unlock while having a cold or some other voice altering circumstance, the person is going to sound different. You have to account for that variance with a threshold in your spectrogram analysis.
But! Accounting for the variance will also prevent you from uniquely identifying that person out of a group of people, so it cannot be used as the "user ID" of a system.
It's OK to use as a password for low security situations, but is too easily defeated in high-security.
You can get an example and/or library for audio handling here[^].
|
|
|
|
|
Hi,
I have to develop an exe module to generates a script text file for all the databases exist on a server(in my case SQL Server2008) with all its objects, data, triggers,etc..
I know this can be achieved by Generate Scrip for Task menu in SQL Server2008 but this is manual & needed to work for each database with explicitly defining its properties selection, thus making it long hours task.
Any sample project would be appreciated
Regards
Ashish
|
|
|
|
|