|
by: lawrence |
last post by:
To call I would do something like:
$headline = McSelectJustOneField::callDatastore("cbHeadline");
Is this the correct use of the static keyword, to implement a
Singleton design?
|
by: Axehelm |
last post by:
Okay, I'm in a debate over whether or not static methods are a good idea in
a general domain class.
I'm personally not a fan of static methods but we seem to be using them to
load an object. For example if you have an Employee class rather then
instantiating an instance you call a static method 'GetEmployees' and it
returns a List of...
|
by: Paul MG |
last post by:
Hi
I have been in the habit, when extracting a private "helper" method
from a public method, of marking it "static" wherever possible -- that
is, when it does not reference instance variables or other non-static
methods. My rationale is that when browsing the source, such methods
can be initially ignored, as they can have no side-effect on...
|
by: baylor |
last post by:
In C#, an interface cannot mark any method as static. i'm told the ILASM
supports it but i've never tested that
Two questions. First, why? OK, i've heard the reason about interfaces being
allocated on the stack but that's not a real reason. Which is OK because this
isn't a real question, it's just a complaint dressed up to look like a reason...
|
by: Sunny |
last post by:
Hi all,
According C# Language Specification :
10.11 Static constructors:
The static constructor for a class executes at most once in a given
application domain. The execution of a static constructor is triggered
by the first of the following events to occur within an application
domain:
- An instance of the class is created.
|
|
by: Marek |
last post by:
Hi,
I am analyzing Duwamish7 source code boundled with Visual Studio .NET 2003.
Could anoybody explain why the Monitor.Enter and Monitor.Exit block is used
inside a static constructor? The code can be found in Project
SystemFramework within module ApplicationLog.cs. Here comes the sample.
namespace Duwamish7.SystemFramework {
(some...
|
by: McFly Racing |
last post by:
Thread Locking In Static Methods
I have the need for a Log Manger class that has static methods. Normally I
would use the lock statement or a Monitor statement both of which take a
reference to (this). In the case of these static methods I am not able to
do that.
|
by: Bob |
last post by:
I have an abstract class Thing which has a static method Thing GetThing().
Class Something inherits from Thing. SomeThing supplies static info for
GetThing to get stuff from the database to create a Something.
Now I have a collection Things<T>:List<T> where T:Thing. In that
collection's code how can I call Thing's static method?
...
|
by: Marek |
last post by:
Hi,
I am analyzing Duwamish7 source code boundled with Visual Studio .NET 2003.
Could anoybody explain why the Monitor.Enter and Monitor.Exit block is used
inside a static constructor? The code can be found in Project
SystemFramework within module ApplicationLog.cs. Here comes the sample.
namespace Duwamish7.SystemFramework {
(some...
|
by: ketan |
last post by:
Hi All,
I have a situation where in I need to call static methods of the
derived class. I checked previous posts, but could not get any
satisfactory reply.
My situation can be simulated with following code.
//
// Does not compile. Not correct C++ syntax - shows what needs to be
|
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...
|
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
|
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. ...
|
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...
|
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...
|
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...
|
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...
|
|
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...
|
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...
|