|
by: Martin |
last post by:
I'd like to be able to get the name of an object instance from within
a call to a method of that same object. Is this at all possible?
The example below works by passing in the name of the object instance
(in this case 'myDog'). Of course it would be better if I could
somehow know from within write() that the name of the object instance
was 'myDog' without having to pass it as a parameter.
////////////////////////////////
function...
|
by: Rasika |
last post by:
Memory usage wise is it a good idea to specify methods in utility/helper
classes as instance methods rather than static methods?
Rasika.
|
by: Adam |
last post by:
We have a web site that uses .vb for the web pages and .cs for a class
module. We are getting the error in .NET 2.0 and VS 2005 beta 2. It does
work with .NET 1.1.
When trying to access a page that needs the class module I get an error on
web site:
Object reference not set to an instance of an object
Here is where the error is:
|
by: tconti |
last post by:
Hello:
We have an application that generates a static database layer based on
stored procedures defined in SQL Server for consumption by client
applications. These classes contain a slew of static methods. In many
cases you only need to use 4 or 5 of these to retrieve/update data from
the db. It seems like a collasal waste to have all of these excess
static methods hanging around. When are these static methods loaded
into memory? ...
|
by: WXS |
last post by:
Sometimes a method in a class requires the use of class instance
variables/fields that will not be used outside of the method itself.
Currently this means you must create a instance field in the class such that
from a maintenance stand point it is disconnected from the method, and also
affords the opportunity for other methods to mess with the variable when they
never should.
For example:
public class MyClass
|
|
by: syssyx |
last post by:
I have a "CurrentUser" object in session that I want to access from
each page of a vb.net website. I can successfully access everything if
I include the following at the start of each pageload:
Dim objCurrentUser As WebsiteClass.CurrentUser =
Session("CurrentUser")
If objCurrentUser Is Nothing Then objCurrentUser = New
WebsiteClass.CurrentUser
Any page can be linked to directly and not force a login, so without
|
by: lars.uffmann |
last post by:
Hi everyone!
I am debugging a big piece of code on the search for memory leaks,
using g++ under suse 9.3.
Since I'm trying to eliminate ALL memory leaks, I now stumbled upon a
class foo that is not ever instantiated (thus no constructor or
destructor ever called), but instead, all of its member variables are
defined as static in the according .cpp file, and it's methods are
invoked by calling foo::bar(...) to invoke method "bar(...)".
|
by: Dave |
last post by:
I have a global.asax file with Application_Start defined and create some
static data there and in another module used in the asp.net application and
I realize that static data is shared amongst child apps of an IIS
application and can be used by multiple users during the application life
cycle and for multiple page loads for the same or different page under a
root application.
What I don't understand and need to know is whether that...
|
by: chenxinleo |
last post by:
Hi,
When i use some standard library functions and fields,which return
char* type(like ctime in time.h, optarg in getopt.h)and do not have to
be freed after calling,i always worry about memory leaking(thoug i
konw i just donot have to).Then i look inside in time.h
file(mingw) ,and i found notes say"These functions write to and return
pointers to static buffers that may be overwritten by other function
calls".So how is the"static buffers"...
|
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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: 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: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
|
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...
|