blah blah blah is here! blah blah » Close

1
votes
2 answers

List<T>.Add is not guaranteed to be thread-safe

.Add is an instance method. That means it's not guaranteed to be thread-safe. What does this mean? Possibility 1. That if two threads invoke .Add on different instances, there could be an unexpected result depending on the phase of ...

1
votes
2 answers

parallel computing in C#

I'd like to get my C# app to run faster by using computers in parallel. (I've already gone multi-threaded on a 4 core computer but it's still not fast enough). If I am going to run computers in parallel, should I stick with Windows or put ...

1
votes
1 answers

ironic thread-safety

Is it or is it not ironic that Microsoft often says that static methods of a Framework class are thread-safe but instance methods of the same class are not guaranteed to be thread-safe? It seems it would be easy to make instance methods ...

1
votes
2 answers

F1 versus msdn.microsoft.com

Which help system is better? Do you use one or the other exclusively or do you use both and why?

0
votes
2 answers

how do you make backups?

I don't know if it's off topic for this forum but it's relevant to programmers. I am annoyed with how I've had to make backups so I am looking for your tips. I am not on a LAN and I suspect many of you also are not. I used to use an ...

1
votes
1 answers

Solid state drive for virtual memory in .NET

I have an app that will allocate objects that in total exceed the physical memory of my computer. When this happens, the program takes forever to complete. I am thinking of getting a solid state drive in order to complete the execution so ...

1
votes
1 answers

reverse iterator for List<T>

What is the cleanest way to have access to both a forward and backward iterator for List<T> and still use foreach?

0
votes
1 answers

building lists with .AddRange and deep cloning

I found that List<T>.AddRange() uses a shallow copy. To make it a deep copy I wrote code to clone via serialization because I saw some suggestions on the internet that suggested ICloneable might be a hassle since you have to guarante ...

0
votes
2 answers

left blank padding of int and float

What is the idiomatic way to left blank pad integers and floats in order to print columns of numbers? How do you choose between String.Format() and number.ToString()?

0
votes
1 answers

iterator for a generic class, compiler error

I'm trying an iterator on my own collection class. I had no problem with the regular version and now I modified it for generics. Since the modifications are minimal, I am surprised it doesn't compile. Any insights? [code] public cla ...

0
votes
1 answers

the exploitation of risk averse cultures

Is there a risk-averse culture definition? A risk-averse culture is probably unambiguous and will only accept 4 digit years and only in a W3C/ISO kind of date format which is year/month/day. Note that to implement your own for dates can ...

1
votes
1 answers

reading nulls from MySQL into nullables in C#

I'm using Connector/NET to connect to MySQL and I want to read float? and int? values from the database. I looked at the metadata and MySQLDataReader does not have any nullable equivalents to GetFloat() and GetUInt32(). I noticed a ...

0
votes
4 answers

I cannot believe .NET really requires me to do this!

According to the Framework, if it's not static it's not guaranteed to be thread-safe. I cannot believe I have to write the code to make countless Framework methods thread-safe! Why doesn't Microsoft wrap locks around everything so that I ...

0
votes
0 answers

is Connector/NET for MySQL thread-safe?

The Connector/NET documentation says the usual Microsoft line about public static members being thread-safe but instance members not being guaranteed as safe. Unfortunately this means nothing because the metadata in Visual Studio seems to ...

0
votes
0 answers

Live and die by the XML Serializer?

I've tentatively decided to just let the XML Serializer "define" my .XML and let the XSD.EXE tool "define" my .XSD schema. It looks like the choice to live and die by the serializer makes it easy to do the XML part of m ...

Feedback