It's already cluttered up to death anyway. All strings are immutable objects. String manipulations create and destroy lots of small objects, that just hang around until the GC gets around to collecting them.
It's a nice idea on paper, but it also introduces problems that can't be fixed until the next GC, like memory fragmentation. The GC maintains the managed heap, compacting memory when it can and when it needs to. It's performance is also self-tuning. Having you just kill and forcibly collect any object you want just destroys the ability of the tuner to do it's job.
Your idea is actually introducing the ability to create more clutter for the GC, not less.
Dave Kreskowiak Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
Is there a way to run a native Windows application if .NET is not installed on the target machine?
There was a way to do this with MS-DOS and Windows applications, by attaching a stub[^] application to the main executable. Then, if the application was launched in MS-DOS, the stub would run instead, usually providing a suitable error message.
You could create a stub, written in unmanaged C++ that MIGHT work
Yes, but how?
The MS-DOS stub was trivial - it was just a one line .EXE that told you to go get Windows. It was added at link time by the /STUB linker argument. I can't find any documentation (apart from vague references to statements like ".NET will contain a win32 stub...") on how to do this - or even if such a thing is possible!
I think the difference here is that just because you are running in a dos shell the windows operating system was still installed. In this case we are taking about something that is not installed. There are three core dlls that run the .net framework. Without these a .net app will not run.
I am new in coding with c++ on the cisual studio 2.0 framework can someone help with this code , i am trying to implement clicking an exit button and calling the message::show function i get error message
Yes' : is not a member of 'System::Windows::Forms::Form::DialogResult'
private: System::Void exitButton_Click_1(System::Object^ sender, System::EventArgs^ e)
if(MessageBox::Show("Are you sure you want to exit this program?", "Close Application!", MessageBoxButtons::YesNo, MessageBoxIcon::Question) == DialogResult::Yes)
I require a software component to be added to an existing .net application(web based). The coponent or the software should posses the following features:
1. It should provide PC to Phone integration either on VOIP technology or TAPI or both.
2. It should provide automated phone dialing from phone number lists.
3. Transfer calls to other users internally.
4. Record conversations and provide automated call reports and statistics.
5. Every phone number in the system should be automatically clickable and the call details must be logged to that user.
6. The phone call must be recorded and stored as a sound file.
Can anyone help me to find any freewares or commercial products available in the market which can provide me the above features.
Thanks in Advance
where there is a will there is a way
I've been wondering this for a while now, and i'm not sure what the best way to deal with it is.
Basicaly, i have a scenario where data is coming into an aspx page that is tamperable by the user. In this case the Querystring.
I am creating a wrapper class that wrapps the Request and then attempts to parse and strongly type the Querystring values so i can expose them as typed nullable properties.
My question is, whether it is better to Throw an exception on parse failure, or raise an event that informs the invoking application that it failed, and then return null.
I have gone for the second solution becase of the speed over exceptions, but it's something i've been mulling over for a while now.
Generaly i'd rather raise exceptions only for programming state errors and have validation of user changable input handled more gracefully. I was just wondering what other peoples opinions on this are, and what they would recommend.
I recently moved into building more comprehensive exception models for my apps and have found that it removes a lot of the ambiguity from the code.