|
by: Kalyan |
last post by:
Hello,
The following posting was made on this newsgroup some 2 yrs ago. Is
this still true with the present release of .net.
Because I get the exact same exception thrown "Function pointer not
created by a delegate".
Or is there a work around provided for this. In my case I don't think
the methods pointed to by function pointers follow __cdecl calling
|
by: LP |
last post by:
Hello!
I am still transitioning from VB.NET to C#. I undertand the basic concepts
of Delegates, more so of Events and somewhat understand AsyncCallback
methods. But I need some clarification on when to use one over another? If
anyone could provide any additional info, your comments, best practices, any
good articles, specific examples, etc.
Thank you
|
by: OpticTygre |
last post by:
Ok, so I've been trying and trying to learn about delegates, but I still
can't grasp the concept of the advantages. Why use delegate functions
instead of calling the function directly?
In other words, if I had something like:
---------------------------------------------
Public Class ProductList
Public Function GetTotal() as Decimal
|
by: Jon Davis |
last post by:
I've used delegates fairly heavily for several years in C# for event
handling and for starting threads.
Does anyone have any real-world scenarios where delegates were both
extremely useful and extremely appropriate (as opposed to other programmatic
means or mechanisms) that were NOT related to events and ThreadStarts?
Thanks,
Jon
|
by: bharathreddy |
last post by:
Delegates
Here in this article I will explain about delegates in brief. Some important points about delegates. This article is meant to only those who already know delegates, it will be a quick review not a detailed one.
Delegates quite simply are special type of object, a delegate just contains the details of a method.
One good way to understanding delegates is by thinking of delegates as something that gives a name to a method...
|
|
by: Siegfried Heintze |
last post by:
I'm studying the book "Microsoft Visual Basic.NET Language Reference" and I
would like some clarify the difference between events and delegates. On page
156 I see a WinForms example of timer that uses the "WithEvents" and events.
There is another example on page 124 that shows how to use delegates to sort
an array.
I don't understand the difference between events and delegates. Are they
redundant features? How do I decide which to use?
...
|
by: DahrkDaiz |
last post by:
Ok so I have a base class and several inherited classes. The base class has 3 Delegate Objects so that the inherited classes can redefine search functions (note, virtual will not work in this case).
After creating an object and reassigning the delegate to a new method, the method is called fine, however, inside the new method, I cannot access the member functions that are inherited from the base class. If I leave the delegates alone and use...
|
by: raylopez99 |
last post by:
They usually don't teach you in most textbooks I've seen that
delegates can be used to call class methods from classes that are
'unaware' of the delegate, so long as the class has the same signature
for the method (i.e., as below, int Square (int)).
Here is an example to show that feature. Note class "UnAwareClass"
has its methods Square and Cuber called by a class DelegateClass.
This is because these methods in UnAwareClass have the...
|
by: David K in San Jose |
last post by:
I'm using managed (CLR) C++ in VS2005 to create a Windows app that contains a form named "MyForm". In the code for that
form I'm trying to invoke some static functions by using an array of function pointers (delegates). I assume I need to
use the array< T keyword to allocate an array of delegates, and then initialize the array by setting each array
element to the pointers (handles) of the functions I'll be invoking.
I've been trying to...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|