C# is a multiparadigm, managed, garbage-collected object-oriented programming language created by Microsoft in parallel with the .NET platform
98
votes
6answers
5k views
SOLID Principles and code structure
At a recent job interview, I couldn't answer a question about SOLID -- beyond providing the basic meaning of the various principles. It really bugs me. I have done a couple of days worth of digging ...
76
votes
11answers
17k views
What backs up the claim that C++ can be faster than a JVM or CLR with JIT? [closed]
A reoccurring theme on SE I've noticed in many questions is the ongoing argument that C++ is faster and/or more efficient than higher level languages like Java. The counter-argument is that modern JVM ...
65
votes
17answers
8k views
Coding Guideline : Methods shouldn't contain more than 7 statements?
I was looking through the AvSol Coding Guidelines for C# and I agree with nearly everything but I'm really curious to see what other think of one specific rule.
AV1500
Methods should not ...
65
votes
16answers
7k views
Do the young minds need to learn the pointer concepts?
Why did the C master Dennis Ritchie introduce pointers in C? And why did the other programming languages like VB.NET or Java or C# eliminate them? I have found some points in Google, and I want to ...
58
votes
12answers
15k views
How can I convince my boss that ANSI C is inadequate for our new project? [closed]
A few months ago, we started developing an app to control an in-house developed test equipment and record a set of measurements. It should have a simple UI, and would likely require threads due to the ...
57
votes
8answers
5k views
Don't Use “Static” in C#?
I submitted an application I wrote to some other architects for code review. One of them almost immediately wrote me back and said "Don't use "static". You can't write automated tests with static ...
53
votes
8answers
26k views
Is modern C++ replacing C#? Is Microsoft pushing developers to adopt C++? [closed]
I hear about modern C++ popularity and some talks about migrating back to C++ from C# or other C-like languages.
I know about C++11 features but I would like to hear your experiences, especially from ...
52
votes
8answers
24k views
How do you organize your projects? [closed]
Do you have any particular style of organizing projects?
For example, currently I'm creating a project for a couple of schools here in Bolivia, this is how I organized it:
TutoMentor (Solution)
...
51
votes
11answers
5k views
Is it a bad practice to modify code strictly for testing purposes
I have a debate with a programmer colleague about whether it is a good or bad practice to modify a working piece of code only to make it testable (via unit tests for example).
My opinion is that it ...
48
votes
16answers
4k views
Are #regions an antipattern or code smell?
In C# code it allows the #region/#endregion keywords to made areas of code collapsible in the editor. Whenever I am doing this though I find it is to hide large chunks of code that could probably be ...
48
votes
6answers
5k views
When to go Fluent in C#?
In many respects I really like the idea of Fluent interfaces, but with all of the modern features of C# (initializers, lambdas, named parameters) I find myself thinking, "is it worth it?", and "Is ...
46
votes
5answers
8k views
As a C# developer, would you learn Java to develop for Android or use MonoDroid instead? [closed]
I'd consider myself pretty well versed in C#. It's my language of choice at the moment, and it's where basically all my professional experience lies.
Still, I'm puzzled by the existence of the ...
44
votes
12answers
4k views
Did the developers of Java consciously abandon RAII?
As a long-time C# programmer, I have recently come to learn more about the advantages of Resource Acquisition Is Initialization (RAII). In particular, I have discovered that the C# idiom:
using (var ...
42
votes
14answers
3k views
Is this a correct situation to use a constant?
So my professor was giving back some feedback on a project I've been working on. He docked a few marks for this code:
if (comboVendor.SelectedIndex == 0) {
createVendor cv = new createVendor();
...
42
votes
8answers
30k views
Relationship between C#, .NET, ASP, ASP.NET etc
I'm really unclear on the difference between C#, C#.NET and the same for ASP and other '.NET' languages.
From what I understand, .NET is a library/framework of... things. I think they're essentially ...