The .NET Framework is a software framework for Microsoft Windows operating systems. It includes an implementation of the Base Class Library, Common Language Runtime, and Dynamic Language Runtime. It supports many programming languages, including C#, VB.NET, F# and C++.

learn more… | top users | synonyms

145
votes
10answers
16k views

Mono is frequently used to say “Yes, .NET is cross-platform”. How valid is that claim? [closed]

In What would you choose for your project between .NET and Java at this point in time? I say that I would consider the "Will you always deploy to Windows?" the single most important (EDIT: technical) ...
112
votes
6answers
11k 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 ...
104
votes
12answers
10k views

Effective Strategies for Localization in .NET

I am developing the UI for a .NET MVC application that will require international localization of all content in the near future. I am very familiar with .NET in general but have never had a project ...
65
votes
13answers
6k views

My boss has a bad case of “Not Invented Here”

My department specializes in converting customer data into our database schema so that they can use our software. Right now, we have C# applications that take an IDataReader (99% of the time it is a ...
63
votes
8answers
41k 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) ...
58
votes
11answers
7k views

Why is the use of abstractions (such as LINQ) so taboo?

I am an independent contractor and, as such, I interview 3-4 times a year for new gigs. I am in the midst of that cycle now and got turned down for an opportunity even though I felt like the ...
57
votes
8answers
65k 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 ...
53
votes
6answers
8k 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 ...
45
votes
11answers
3k views

I don't understand how TDD helps me get a good design if I need a design to start testing it

I'm trying to wrap my head around TDD, specifically the development part. I've looked at some books, but the ones I found mainly tackle the testing part - the History of NUnit, why testing is good, ...
38
votes
1answer
3k views

Why does the .Net world seem to embrace magic strings instead of staticly typed alternatives?

So, I work in .Net. I make open source projects in .Net. One of my biggest problems with it isn't necessariyl with .Net, but with the community and frameworks around it. It seems everywhere that ...
34
votes
14answers
9k views

Why use an OO approach instead of a giant “switch” statement?

I am working in a .Net, C# shop and I have a coworker that keeps insisting that we should use giant Switch statements in our code with lots of "Cases" rather than more object oriented approaches. His ...
34
votes
8answers
2k views

Is Linq having a mind-numbing effect on .NET programmers?

A lot of us started seeing this phenomenon with jQuery about a year ago when people started asking how to do absolutely insane things like retrieve the query string with jQuery. The difference ...
32
votes
7answers
9k views

Return magic value, throw exception or return false on failure?

I sometimes end up having to write a method or property for a class library for which it is not exceptional to have no real answer, but a failure. Something cannot be determined, is not available, not ...
32
votes
2answers
6k views

Why is 'void' not allowed as a generic type in C#

What were the design decisions that argued in favour of void not being constructable and not being allowed as a generic type? After all it is just a special empty struct and would have avoided the ...
32
votes
2answers
14k views

Best practices for logging and tracing in .NET

I've been reading a lot about tracing and logging, trying to find some golden rule for best practices in the matter, but there isn't any. People say that good programmers produce good tracing, but put ...
30
votes
4answers
4k views

Why does F# have an interactive mode but not C#?

F# comes out of the box with an interactive REPL. C# has nothing of the sort and is in fact kinda difficult to play around without setting up a full project (though LINQpad works and its also possible ...
30
votes
8answers
2k views

S.O.L.I.D., avoiding anemic domains, dependency injection?

Although this could be a programming language agnostic question, I'm interested in answers targeting the .NET ecosystem. This is the scenario: suppose we need to develop a simple console application ...
26
votes
13answers
8k views

What are the criteria for evaluating an ORM for.NET?

I'm looking at evaluating ORMs. I've used SubSonic, Linq-to-SQL and Entity Framework. I've got a team of developers ranging from juniors to seniors. What are the criterias for evaluating an ORM ...
26
votes
7answers
3k views

Why do .Net books talk about stack vs heap memory allocation?

It seems like every .net book talks about value types vs reference types and makes it a point to (often incorrectly) state where each type is stored - the heap or the stack. Usually it's in the first ...
25
votes
5answers
7k views

MonoTouch vs Objective-C for iPhone/iPod/iPad development [closed]

For someone with .Net experience and wanting to develop for iPhone/iPod/iPad, is it worth learning Objective-C? Is MonoTouch a good alternative? What are some of the trade-offs when using MonoTouch vs ...
25
votes
6answers
702 views

Separating a “wad of stuff” utility project into individual components with “optional” dependencies

Over the years of using C#/.NET for a bunch of in-house projects, we've had one library grow organically into one huge wad of stuff. It's called "Util", and I'm sure many of you have seen one of these ...
24
votes
17answers
5k views

Does Silverlight have a future? [closed]

Recently I have read some articles/blogs/comments about the development and history of WPF and Silverlight. In some forums many developers and users criticize the performance of WPF applications (for ...
23
votes
15answers
1k views

How do I convince my team to use smaller classes/methods?

Disclaimer: I'm a newcomer (this is my third day of work), and most of my teammates are more experienced than me. When I look at our code, I see some code smells and bad engineering practices, like ...
21
votes
1answer
2k views

Is C++.Net used extensively?

I am a C++ coder by tradition. Over the last 12 months or so I have been doing a lot of C# coding, and have been pleasantly surprised by C#'s pragmatic approach (once I stopped trying to code it as ...
21
votes
3answers
1k views

Is .NET WCF worth the effort? [closed]

Maybe it's me, but I've never encountered nearly as many problems, annoying challenges, indirect error messages and general frustrations with any other technology as I have with WCF. What are the ...
21
votes
1answer
2k views

Any experience with Mono on production servers? [closed]

I am curios to use .NET for some web applications (e.g. ASP.NET MVC 2). However my budget is limited so I would like to use Mono on Linux. I have never used Mono before, and I haven't read about any ...
20
votes
8answers
9k views

Why was Scala not implemented with C or C++

Does anybody know why was Scala implemented in Java and .NET instead of C or C++? Most languages are implemented with Cor C++ [i.e Erlang, Python, PHP, Ruby, Perl]. What are the advantages for Scala ...
20
votes
5answers
14k views

Alternatives to Octopus for deploying .NET applications? [closed]

Our shop has a TeamCity server that produces deployment packages. The packages are either ASP.NET web apps, Windows services, or miscellaneous binaries (that just get copied to the network ...
20
votes
7answers
722 views

Does making source code available affect your ability to generate revenue?

We’re working on a .Net framework which ultimately amounts to a single DLL. We intend to charge for commercial use of the framework, but make it free for open source/non-commercial use. The rough ...
20
votes
9answers
4k views

Delegate vs Interfaces-Any more clarifications available?

After reading the article- When to Use Delegates Instead of Interfaces (C# Programming Guide), I need some help understanding the below given points, which I found to be not so clear (for me). Any ...
20
votes
5answers
10k views

What's the best way to build a factory using NInject?

I am pretty comfortable with dependency injection using NInject in MVC3. While working in an MVC3 application, I developed a custom Controller Creation Factory using NInject, so any controller that is ...
19
votes
6answers
12k views

Which platform to choose, Java or .NET? [duplicate]

I am working in a private bank, a leading mid size bank in local market. We are going to create our core banking solution. Existing solution has been developed on Java using IBM Visual Age 4.0. It is ...
19
votes
12answers
13k views

What are the practical uses of Windows Services?

I am new to working with Windows Services. Although I have learnt to create Windows Services in VS2010 I would like to know some practical ways in which windows services could be used? I tried ...
19
votes
12answers
2k views

Managed Coders vs Native Coders

I'm a coder and have experience with both native and managed code. I started out with Pascal and C, then moved into C++ and eventually into C#. Over the last year or so, I've been coding almost ...
19
votes
5answers
9k views

Why would anyone invest time in Microsoft “Roslyn”?

I have just been reading through some of the white papers & examples from Microsoft "Roslyn" and the concept seems very interesting. From what I can tell, it opens up the black box that is the ...
19
votes
5answers
6k views

Moving from Winforms to WPF [closed]

I am a long time experienced Windows Forms developer, but now it's time to move to WPF because a new WPF project is comming soon to me and I have only a short lead time to prepare myself to learn WPF. ...
19
votes
7answers
6k views

Best practices for moving large MS Access application towards .Net?

We have a really huge MS Access application developed in-house initially for our personal needs which then was turned into a commercial software and successfully sold. The software is a sort of ...
18
votes
13answers
1k views

C# or .Net features to cut off assuming no backward compatibility needed? [closed]

Any product or framework evolves. Mainly it's done to catch up the needs of it's users, leverage new computing powers and simply make it better. Sometimes the primary design goal also changes with the ...
18
votes
7answers
1k views

Does Mono have a place in the enterprise world?

For enterprise windows-based solutions, .NET is the best choice sometimes. How is Mono looked at by the enterprises who have to use Linux (or rather prefer to use Linux) ? Assuming that the developers ...
18
votes
7answers
891 views

How to Avoid Fragile Unit Tests?

We have written close to 3,000 tests -- data has been hard coded, very little reuse of code. This methodology has began to bite us in the ass. As the system changes we find ourselves spending more ...
18
votes
10answers
834 views

Is it reasonable to assume/require the .NET framework these days?

Background: I have a project where I need to provide the user a download package with some sensitive data in it. The data needs to be encrypted. After they download it, they need to be able to view ...
18
votes
4answers
16k views

Anyone who has taken 70-515 TS: Web Applications Development with Microsoft .NET Framework 4 exam? [closed]

I'm planning to take 70-515 exam and I can't find any training kit for it from MS press at the moment. Therefore, I'm reading the book for 70-562 which covers framework 3.5. I would like to know if ...
18
votes
4answers
8k views

When to use weak references in .Net?

I have not personally come across a situation where I've needed to use WeakReference type in .Net, but the popular belief seems to be that it should be used in caches. Dr Jon Harrop gave a very good ...
18
votes
3answers
1k views

Moving away from .Net to Ruby and coping without intellisense [closed]

I am in the process of trying to learn Ruby, however after spending nearly 10 years in the MS stack I am struggling to get by without intellisense. I've given RubyMine a try which does help however ...
18
votes
1answer
2k views

Async network programming using Reactive Extensions

After doing some (more-or-less) "low-level" async socket programming years ago (in an Event-based Asynchronous Pattern (EAP) fashion) and recently moving "up" to a TcpListener (Asynchronous ...
17
votes
5answers
3k views

Why can't Windows services have a GUI?

I was using this feature in earlier Windows release like XP and NT. I was able to run a GUI from a Windows service. But it is not possible in the later versions. What is the reason behind the removal ...
17
votes
9answers
5k views

Why hasn't C# gained much traction within the opensource community? [closed]

I'm not expecting C# to be on par with say Java or Python in the open source community, but it still surprises me just how far behind it is. 'Multi language' open source repos like google code or ...
17
votes
6answers
30k views

.NET Properties - Use Private Set or ReadOnly Property?

In what situation should I use a Private Set on a property versus making it a ReadOnly property? Take into consideration the two very simplistic examples below. First example: Public Class Person ...
17
votes
4answers
2k views

Is there a canonical source for learning C# and .NET internals?

I have been a C++ programmer for last several years with a bit of C# here and there. In my latest job, I work heavily on C#. I picked most of my C# by following the code-base or random google searches ...
17
votes
6answers
1k views

Should the usage of DI/IoC remove all occurrences of the “new” keyword?

Should the usage of Dependency Injection and an Inversion of Control container remove all occurrences of the "new" keyword from your code? In other words, should every object/dependency, no matter ...