|
by: kode |
last post by:
im having problems trying to understand the delegates in
c#, does anybody know some link where i can find a good
and simple explanation?
thanks
|
by: Brad |
last post by:
Question for all: Would one consider this a loophole in .net with respect
to nested (inner) classes?
1) Create outer class Foo and create a nested class Yin (inside Foo's class
definition ofcourse).
2) Let Foo have non-static protected (or public) method Bar() and Yin have a
non-static method called Yang().
4) Add a member object to Foo of Class Yin called yinObj.
|
by: Robert |
last post by:
I need some assistance doing some "right way to do it" coding. The following
are EventHandlers associated with Delegates in a child form that call a
procedure in the MDI form that resets a timer. There must be a better way to
code this than calling OnResetTimer in all these procedures separately. Is
there not a way to use one handler for all of them?
private void pnlCPI_MouseMove(object sender,
System.Windows.Forms.MouseEventArgs e)...
|
by: Raj Chudasama |
last post by:
I have a client server app. On the client i have buttons (derived from user
contol) that let user perform actions when they are connected to the server.
so when they connect (using a menuitem) i add event handlers to the buttons
and when they disconnect i remove them. Now, everything works fine when
they connnect for the first time. All of the msgs are sent propoerly by the
client. To figure out what button is click by the client i used...
|
by: Phil |
last post by:
Does any body know how to get a list of event handlers
assigned to a paticular event?
I'd like to be able to determine if a sub has already been
added as an event handler for a form.paint event.
while eventinfo has methods for addhandler and remove
handler I don't se a way to do a 'gethandler'
or 'enumeratehandlers' etc.
|
|
by: Burkhard |
last post by:
Hi,
I am new to C# (with long year experience in C++) and I am a bit confused by
the language construct of events. What is it I can do with events that I
cannot do with delegates? At the moment it seems to me that Microsoft has
developed similar functionality via two keywords. I do understand that an
event offers better encapsulation as the underlying delegate is private, but
is that all ?
--
Regards
|
by: Cedric Rogers |
last post by:
I wasn't sure if I could do this. I believe I am stretching the capability of
what generics can do for me but here goes.
I have a generic delegate defined as
public delegate bool RuleDelegate<T>(T item);
In my class my goal is to use a generic list collection to contain my
generic delegates. This will allow me to pass this List to another library
and call this list of functions. This could provide a new way to build rule
base...
|
by: RvGrah |
last post by:
I'm using the Activated event of my form to run a database query in a
backroundWorker, and want to dismiss the call after the first time the
form is activated. Based on some excellent advice in an earlier post,
instead of maintaining a flag, I'm unsubscribing to this eventHandler.
My question is, why is this functional:
this.Activated -= new
System.EventHandler(Form1_Activated);
instead of:
|
by: =?Utf-8?B?VG9tIENvcmNvcmFu?= |
last post by:
I've been led to believe by several articles, particularly Eric Gunnerson's
C# Calling Code Dynamically, that calling a method dynamically through
Reflection was much slower than through a Delegate. My testing showed that
actually it was six times faster: 0.5 seconds for 100,000 iterations versus
3.1 seconds.
Can anyone explain why? Something in the way I coded it? I'd appreciate
any insights.
Here's the code (in a Windows Form...
|
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: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
|