I need to build a big list of strings and keep it in memory, however while building it an OutOfMemoryException is thrown. According to Resource Monitor I still have 1GB of memory available. I found this KB article addressing the issue, but it seems like it should have been fixed in framework 1.1 SP1 (I am using 3.5 sp1).
Can anybody sh...
I want to be able to set a bunch of controls on a Form to Read-Only and back with a button click. Is there a way to loop through them? this.Controls maybe......
Thanks!
...
I am getting married this coming Saturday (May 30 2009). We are poor. So, instead of hiring a DJ, I want my friend to kick off mp3 playlists from a laptop to be played through a PA system.
Well I had a vision for some software that would be perfect for this. Here is that vision:
I want this to be so that my friend can't screw this up ...
Hi
I am trying to figure out why a program I am working on goes in to "not responding" mode when I ask it to output a large amount of characters to the console it is running in.
I tried creating a small example that just prints out characters, and this will indeed also go "not responding" on me after some 10-20 seconds:
static void Ma...
Is it possible to throw an exception (could be any exception) with a customized stack trace?
As a concrete example: lets say I have a set of some small static utility methods which might throw exceptions. However I would like the exception to appear to have originated from the previous method instead of the utility method (I want to ign...
C#: How should TCP socket buffer data be handled? As bytes or converted to an ascii string?
I am using methods that are involved in parsing specific data from the returned tcp socket buffer, which practice would be best?
Should I process/parse my data in it's raw byte form? Or should I process it after convert it to an ascii string si...
When you have automatic properties, C# compiler asks you to call the this constructor on any constructor you have, to make sure everything is initialized before you access them.
If you don't use automatic properties, but simply declare the values, you can avoid using the this constructor.
What's the overhead of using this on constructo...
I'm creating an ActivityToolboxItem for a custom Activity in WF. I'm trying to do as much work as possible for the designers within the CreateComponentsCore method. What I'm trying to end up with is the following:
1) My custom activity (TriggerActivity, a SequenceActivity), containing the following:
2) A TriggerEvaluatorActivity (a si...
If you have an immutable type like this:
struct Point3
{
}
and a member inside like origin:
public static const Point3 Origin = new Point3 (0,0,0);
should you use:
new Point3 (0,0,0)
?
It seems to me that since the type can not be changed, why have many origins that are essentially the same thing? Like we never change 0, right...
I've tried changing the RowStyle Wrap property and every Wrap property in the grid. How do I stop word wrap in a Gridview no matter what size the Row's Text Length is?
...
I understand that Subsonic 2.2 requires the MySQL.data 5.2.3 dll. I'm trying to integrate a subsonic DAL for a VB project in Visual Studio. The project already uses a lot of datasets. Because of this, Visual Studio requires that I have the MySQL NET connector software installed, which automatically throws its own MySQL dll deep into ...
The process is elevated and I ensured that the path was correct in VS debugger (I'm using Environment.GetFolderPath(Environment.SpecialFolder.System) not hard coding it in) but File.Exists still returns false.
The reason I need this is a workaround for ensuring some 3rd party drivers are installed because their registry settings aren't ...
What is the difference between the ListView.ItemCheck and ListView.ItemChecked events in .NET?
...
I am wondering how immutability is defined? If the values aren't exposed as public, so can't be modified, then it's enough?
Can the values be modified inside the type, not by the customer of the type?
Or can one only set them inside a constructor? If so, in the cases of double initialization (using the this keyword on structs, etc) is ...
C#: What takes up more memory? A string or bytes?
Let's say I have a line that reads "My Text", in which form would that line use up more memory, as a byte or a string?
...
I have a range bar chart where one bar is always supposed to be collapsed to a line (the actual value). The other bar shows the statistical uncertainty. No matter how "infinitesimally" small I make the range of the blue bar, there are always instances where the resulting output will be two pixels wide on the screen, whereas in most cases...
Whats the best way to go through all the controls on a form in vb2005?
Im writing a program that can edit a string of bytes based on the information on the form.
each control is tagged with the hex address it modifies and values it can be, what is the best way to go through all the controls on a form even those controls embedded in other...
I have recently purchased a laptop to do some offsite development, as well some of my own work during commuting.
I am used to developing on XP, but the laptop was bundled with a version of Vista Home Premium (I had no say in this unfortunately). I tried to install XP on it, but it failed as the XP install doesn't come with SATA drivers....
I was seeing some strange behavior in a multi threading application which I wrote and which was not scaling well across multiple cores.
The following code illustrates the behavior I am seeing. It appears the heap intensive operations do not scale across multiple cores rather they seem to slow down. ie using a single thread would be fas...
My application needs to decompress files which contain a lot of Deflate compressed blocks (as well as other types of compression and encryption). Memory profiling shows that the deflate stream constructor is responsible for allocating the majority of the application's memory over its lifetime (54.19%, followed by DeflateStream.read at 12...