0
votes
1answer
75 views

Can GC.SuppressFinalize cause performance problems?

I'm being asked to implement IDisposable on objects that are 100% managed resources, which contain no streams, and no large resources. I understand the importance of properly disposing of large ...
4
votes
3answers
204 views

How should I unit test a bitmap modifying method?

My Sprite class has a method: private void updateWithBitmap(Bitmap b, int x, int y) This will 'lay on top' the bitmap that's passed in, the top left corner of the passed in bitmap being at the x,y ...
20
votes
5answers
3k views

Why can't Java/C# implement RAII?

Question: Why can't Java/C# implement RAII? Clarification: I am aware the garbage collector is not deterministic. So with the current language features it is not possible for an object's Dispose() ...
2
votes
6answers
3k views

What are the alternatives to resx file

I am developing a Windows application and I want to store all the text for labels, radio buttons, buttons, check boxes and column headers of grids at one place. I have tried using a class file, an xml ...
8
votes
3answers
547 views

How to migrate my thinking from C++ to C#

I am an experienced C++ developer, I know the language in great details and have used some of its specific features intensively. Also, I know principles of OOD and design patterns. I am now learning ...
6
votes
3answers
894 views

Building a string translation database for multiple (in-house) projects

At our company we have an existing translation ms-sql table wich stores strings like this: Id | Key | Language | Value 1 | hello-world | nl-BE | Hallo Wereld 2 | hello-world | en-GB ...
3
votes
1answer
356 views

Is it a good idea to put all assembly: WebResource in the same cs file?

I have a .NET library, with some WebControls. These webControls have Embed Resources. And we declare them like it, in all webcontrols for each cs file: Something like this: [assembly: ...