|
by: Carlos Ribeiro |
last post by:
I thought about this problem over the weekend, after long hours of
hacking some metaclasses to allow me to express some real case data
structures as Python classes. I think that this is something with
potential to be useful, but I would like to hear more opinions first.
If this is deemed to be useful, I *may* try to write a PEP for it.
This is not a promise or even a proposal, at this point.
Broadly generalizing, classes in Python have...
|
by: Cordell Lawrence |
last post by:
Okay guys,
We are wondering if this is a bug in Framework 2.0.40607 and
looking for some clarification on the issue. Take a look at the folowing
code.
public delegate bool BoundryTest(int myVal);
|
by: anonymous |
last post by:
I believe I ran into an interesting way to create memory leaks in C# 2.0
using anymous delegates. Here is a sample of the code in question.
private void Handle_Event(object sender, EventArgs e)
{
Timer timer = new Timer();
timer.Interval = 10000;
NotifyForm notifyForm = new notifyForm();
notifyForm.Show();
timer.Tick += delegate(object timerSender, EventArgs tArgs)
|
by: John Smith |
last post by:
I really can not appreciate why Microsoft has introduced Anonymous
methods. It promotes quick and dirty style of programming and as I can
see it offers no advantages over normal methods.
I have spent years reviewing source code and asking people not to write
anonymous code (supported by some non-MS high level languages) and it
has made it's way to C# also!
|
by: Harold Howe |
last post by:
I am running into a situation where the compiler complains that it
cannot infer the type parameters of a generic method when one of the
function arguments is an anonymous method.
Here is a complete code example:
//-----------------------------
using System;
using System.Collections.Generic;
|
|
by: Frankie |
last post by:
I have just gotten up to speed on what anonymous methods are (syntax,
capabilities, etc), and how they can be used with /called via delegates.
What I am wondering is...
1. Are they only/mostly syntactic sugar (important as that can be)?
2. Are anonymous methods *required* anywhere? That is, are anonymous methods
the only way to accomplish certain tasks in
..NET programming?
|
by: Robert Howells |
last post by:
Is there any such thing as an "anonymous delegate"? I understand what an
anonymous method is, but I'm unclear of the concept of anonymous delegate
(if it is even a valid term to be using). Is an "anoymous delegate" simply
an anonymous method used in conjunction with a delegate declaration?
Thanks!
|
by: Tony |
last post by:
Hello!
Here I have some text from a book I read. It says:
"An interesting point to note concerning anonymous methods is that they are
effectively local to the code
block that contains them, and they have access to local variables in this
scope. If you use such a variable
it becomes an outer variable. Outer variables are not disposed of when they
go out of scope like other
local variables are; instead, they live on until the anonymous...
|
by: Peter Duniho |
last post by:
On Mon, 01 Sep 2008 16:14:10 -0700, Blip <blip@krumpli.comwrote:
Briefly, an anonymous method is exactly that: a method without a name.
When you use the "delegate" keyword to declare an anonymous method, all
you're doing is writing a method the same as you would anywhere else,
except that it doesn't have a name, and so you have to use it right away
rather than being able to refer to it elsewhere. (And I mean that only in
the static,...
|
by: Peter |
last post by:
Hi
I've been delving into "delegates" and "anonymous methods", and now
I've come across the term "closure".
Some information I've found says that C# does not have closures, other
information says that C# does have closures.
My problem is I can't quite grasp what "closures" are. The examples I
have seen seem to be "anonymous methods". What is the subtle difference
|
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: 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: 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: 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: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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...
|