|
i am familiar with asp.net,i never used delegate but when i go interview they asking about delegate where do u use in your project, i am unable to said answer bcoz i never used can any one tell where really delegate is necessary in real time where actually used delegate
i want real time application development use of delegate, i know that concept how it works.
This is haneef.............................................................
|
|
|
|
|
* When u write a method which compares two objects and u want to allow user to specify comprasion method. Then u put a Comprasion<t> parameter.
* Array.Sort(Comprasion<t>)</t> , Thread(Action) etc.
* Events.
Greetings - Gajatko
Portable.NET is part of DotGNU, a project to build a complete Free Software replacement for .NET - a system that truly belongs to the developers.
|
|
|
|
|
Delegate is a type-safe function pointer. Which is point a method with specific signature.
It has much more uses in these days. Like:
(i) Asynchronous Programming
(ii) With Unmanaged Code
(iii) Invoking the Events in Callback or Asynchronous programming.
Parwej Ahamad
R & D: REST services with WCF
|
|
|
|
|
This is not the ASP.NET forum.
Delegates are used for a start whenever an event fires. In ASP.NET, Page_load and Page_prerender work b/c of delegates. In winforms, your click events, load events, etc, work b/c of delegates. I would use delegates most for communication between forms, or between user controls in ASP.NET. You'd use delegates a lot less in ASP.NET b/c it's stateless, your page is completely recreated on every postback.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Good Day,
Why is it that when I distribute my DLL, the intellisense won't work?
I mean, this stuffs:
/// summary
///
/// /summary
/// <param name="input"></param>
/// <returns></returns>
Thanks!
It is said that the most complex structures built by mankind are software systems. This is not generally appreciated because most people cannot see them. Maybe that's a good thing because if we saw them as buildings, we'd deem many of them unsafe.
|
|
|
|
|
Are you distributing the XML file with it?
|
|
|
|
|
I'm sorry. What XML file?
It is said that the most complex structures built by mankind are software systems. This is not generally appreciated because most people cannot see them. Maybe that's a good thing because if we saw them as buildings, we'd deem many of them unsafe.
|
|
|
|
|
When you build your project, the compiler should be told to also generate an XML file, using your XML comments. If you distribute this file with your library, the comments are available in Intellisense.
|
|
|
|
|
Thanks for your reply.
How can I instruct Visual Studio to generate the XML file?
It is said that the most complex structures built by mankind are software systems. This is not generally appreciated because most people cannot see them. Maybe that's a good thing because if we saw them as buildings, we'd deem many of them unsafe.
|
|
|
|
|
I don't know off hand, I normally use the Help to find functions like this.
|
|
|
|
|
This can be set in the project properties screen, on the "Build" tab. You may have to scroll the screen down some, but there is a check box labeled "XML documentation file". You will need to check that box. Be aware that this is a "per-configuration" property, so you will need to enable it in both debug and release mode builds.
Scott Dorman Microsoft® MVP - Visual C# | MCPD
President - Tampa Bay IASA
Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai
[ Forum Guidelines][ Articles][ Blog]
|
|
|
|
|
He shouldn't need to distribute a XML file. I don't know if it's because he doesn't know how to format his code blocks, or what, but notice that he's missing the <> around his summary tags.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
I think that is CP disallowing them because it thinks he might be doing something bad.
Regards,
Gareth.
(FKA gareth111)
|
|
|
|
|
I think I mentioned that possibility. Still, I've written numerous class libraries in C#, and I've never once specifically created a XML file. I know it's not looking for one because I typically copy just the DLL into a separate folder before using it. It might be a project setting, but there's no external file associated with intellisense.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Good Day Sir,
That is exactly what I'm doing. After building the Class Library, I copy the DLL file then I add a reference to that DLL file in a new project, but the intellisense no longer works.
Thanks!
It is said that the most complex structures built by mankind are software systems. This is not generally appreciated because most people cannot see them. Maybe that's a good thing because if we saw them as buildings, we'd deem many of them unsafe.
|
|
|
|
|
Just to clarify: you are actually putting some wording in the summary /summary section...?
cheers,
Chris Maunder
CodeProject.com : C++ MVP
|
|
|
|
|
yes sir, I did.
But it wont show up here even with the gt and lt signs.
It is said that the most complex structures built by mankind are software systems. This is not generally appreciated because most people cannot see them. Maybe that's a good thing because if we saw them as buildings, we'd deem many of them unsafe.
|
|
|
|
|
Can someone point me to some good material on designing an application to be Vista compatible? I've did a minor google search but haven't found anything of value.
"Make it as simple as possible, but no simpler" Issac Newton
|
|
|
|
|
|
Vista is a nightmare. The main thing tho, is to make sure you don't try to write to any files in the application directory. Your config files need to be in the users folder, not the app folder.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
So if i had my form open, and i click, the click will fall to the desktop, or other forms...
any easy way to do this?
|
|
|
|
|
Not a trivial way, no.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
hmm so does the hard way involve wndproc in some fashion, or are we talking harder :P
|
|
|
|
|
You can actually call an API called WindowFromPoint. So, hide your window, call that API on the screen point you clicked, convert to a point relative to the window and send it a WM_CLICK message. And a WM_LBUTTONDOWN and WM_LBUTTONUP. FIddly, more than anything.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Ya no luck with WindowFromPoint (in vista) so far... Also how do i "hide" a form from WindowFromPoint but keep it visible?, i tried making it not enabled, and some ShowWindowAsync(shades.Handle, SW_HIDE) which definatally hides it from view, but i want it visible still...
Also i tried with one of those lowlevel-ish hooks to watch the mouse when it's off my form, and so far WindowFromPoint returns 0 regardless...
something that caught my eye though was:
private const int WM_NCHITTEST = 0x0084;
private const int HTTRANSPARENT = (-1);
protected override void WndProc(ref Message m)
{
if (m.Msg == WM_NCHITTEST)
{
m.Result = (IntPtr)HTTRANSPARENT;
}
else
{
base.WndProc(ref m);
}
}
but it doesn't work for other threads... else it'd be very good solution :P
|
|
|
|