C# is a multiparadigm, managed, garbage-collected object-oriented programming language created by Microsoft in parallel with the .NET platform

learn more… | top users | synonyms

4
votes
5answers
7k views

Is it possible for two DLLs to conflict , preventing solution to build

Though I have a specific case, but I was wondering about the general situation. Can two DLLs, when added as Reference to a Visual C# project collide with each other to prevent the solution from ...
13
votes
7answers
1k views

Does C# experience translate well to C++? [closed]

My programming classes in school were C++, but I ended up working a job doing C# for the last few years. If there was a position that required say 1 or 2 years experience in C++, would my experience ...
0
votes
2answers
137 views

Is hooking Data access method on wrong object detrimental for a developer

In a simple application I am creating there are Admin and users where admin can create users. Right now I am creating Classes that encapsulate database CRUD calls with methods. For example: ...
19
votes
3answers
13k views

Which is a better practice - helper methods as instance or static?

This question is subjective but I was just curious how most programmers approach this. The sample below is in pseudo-C# but this should apply to Java, C++, and other OOP languages as well. Anyway, ...
0
votes
1answer
3k views

How much do i need to learn in order to get an entry level asp.net job? [duplicate]

Possible Duplicate: If you develop with ASP.NET, which other technologies do you use? I'm currently learning C#, but I've noticed that there is a lot of demand for ASP.NET developers. I ...
20
votes
6answers
3k views

C++ Renaissance - marketing slogan? [duplicate]

Possible Duplicate: What does the latest “C++ Renaissance” mean? Lately, I hear a lot about C++ Renaissance. What is that? C++ is currently undergoing a renaissance. This ...
4
votes
7answers
3k views

What is it called when you set properties on object initialization?

What is it called when you set properties on object initialization? var customer = new Customer() {RequestID = request.ID, AddressID = 5}; Is it considered good practice?
5
votes
1answer
124 views

Checking members and instantiating in properties

Consider this: public MyClass { private Resource _myResource; public Resource MyResource { get { if(_myResource == null) { ...
5
votes
2answers
410 views

Trying to identify IClass, Class, ClassImpl pattern

I've been seeing a lot of code recently that looks like this: public interface IFoo { int Bar(); } public static class Foo { public static IFoo Create() { return new FooImpl(); } private ...
3
votes
3answers
939 views

Do You Have To Know CIL To Make A Compiler for .NET?

Assume one wants to create a simple .NET language, or slightly more difficult, a compiler for an existing .NET language. Do you absolutely need to be familiar with the CIL (Common Intermediate ...
5
votes
2answers
1k views

Is there such a thing as too much asynchronous code?

I am at the moment messing around with clients and servers in C# winforms and I'm trying to implement it all asynchronously. However, I'm beginning to wonder, should I use asynchronous code for ...
5
votes
5answers
227 views

Value of maintaining debug outputs

A developer on our team litters his code with debug outputs. He passes many parameters into methods that are only used for debugging. Personally I find this clutters up the code. If I need to debug ...
5
votes
1answer
4k views

Implementing a DAO for entity framework

Could anybody help me to find a good tutorial about how can I implement DAO pattern and also tools that help me to create this classes in automated way.
4
votes
4answers
638 views

Java/C# - When should AOT be considered if reverse engineering is a concern?

Long and short is really in the question title. For a language which compiles to an intermediate language like MSIL or Java byte-code, if there's concern about something like reverse engineering or ...
6
votes
2answers
3k views

Command handlers and DDD

I have an ASP.NET MVC application, that uses a query service to get data and a command service to send commands. My question is about the command part. If a request comes in, the command service uses ...
10
votes
4answers
4k views

Would scala be a good choice instead of Java?

We will be starting a new project which will involve training all the .net developers in Java (frameworks/ECO system etc). We have a lot of code written in C# and it seems that all of this will be ...
6
votes
4answers
1k views

how to start with ASP.NET MVC 3 razor [closed]

I going to start a new project in my company in which are involved the use of MVC 3, now this is the first time that we are using this framework, and i have a couple of questions, It's recommended ...
5
votes
5answers
4k views

Examples of composition in software engineering?

In programming, various terms like abstraction are mentioned quite heavily. What, however, is composition? What is a basic but effective example of composition at play to result in good quality code ...
10
votes
3answers
4k views

What should I include in XML documentation comments?

I'm trying to make a point of documenting my code better, especially when it comes to the XML comments on class members, but often it just feels silly. In the case of event handlers, the naming ...
0
votes
3answers
2k views

PHP vs C# performance

I have a application that is part console application written in C# and part PHP web application. The console application connects to multiple serial devices and reads data pertaining to moisture ...
16
votes
6answers
2k views

When should I use a 2-property class over a pre-built structure like a KeyValuePair?

When should you put Key/Value type of data in it's own class instead of using a pre-built generic structure, such as a KeyValuePair or a Tuple? For example, most ComboBoxes I create contain a ...
5
votes
3answers
1k views

What should I name this helper class? [closed]

Usually when writing unit tests I create a helper class with extension methods. I use these methods exclusively for generating generic data for things that I am too lazy to type out. I usually name ...
4
votes
1answer
687 views

Where to find resources to write a program like sandboxie?

Sandboxie is a program that will let you read from the hard drive, but when you try to write back it will redirect the file to a separate container. I would like to learn how to do something similar. ...
32
votes
10answers
3k views

Difference between Idiom and Design Pattern?

What is the difference between idiom and design-pattern? It seems that these terminologies overlap somewhere; where exactly, I don't know. Are they interchangeable? When should I use what? Here is a ...
10
votes
4answers
11k views

In simple words what are are the purposes of abstract classes and/or interfaces? [duplicate]

I have to explain to some students the use of abstract classes and interfaces, as I have a very tecnical background, I would like to know if you would help me to define an easy explanation for junior. ...
13
votes
3answers
3k views

Namespace and class name guidelines

I'm having problems naming my classes and services correctly when utils and other help classes are involved. How would you structure the following: EventService.cs EventServiceUtils.cs ...
6
votes
2answers
388 views

Idea for a domain specific language or DLR port?

I have my undergraduate final year project coming up and am very interested in lexers, parsers, compilers and so on. I would like to use the DLR (.NET 4.0 dynamic language runtime) for my ...
5
votes
3answers
829 views

What is the best way to scale a CQRS system?

In the previous months I have been asking a lot of questions concerning the architecture of an application I'm working on. Thanks to the answers the architectural design has changed - in fact, it has ...
4
votes
2answers
353 views

What is the best way to validate the following data?

Lets say I receive an xml request that is sent to my web service and this request contains some data in it such as Hotel Room/Rate pairs (Room = Double Queen, Rate = 10%). The database has all of ...
12
votes
2answers
3k views

Why is the Repository pattern needed in NHibernate?

I am reading the official Your first NHibernate based application. While the tutorial is good and easy to follow, I am wondering why the Repository pattern is used. In the various Add, Update, ...
69
votes
16answers
10k 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 ...
5
votes
5answers
1k views

When inheriting from a class in C#, which naming convention is preferred?

If you inherit from Tile, for example, should the subclass be called CollisionTile or just Collision? What about for painting tools in an application like Paint? PenTool or just Pen? Are there any ...
1
vote
5answers
2k views

How can I study C# from Stack Overflow [closed]

How can I study C# from Stack Overflow? I have only the basics of the C# language with some simple exercises; now I want to go to the highest level C# through Stack Overflow, reading any questions ...
6
votes
3answers
2k views

Inject dependency as method parameter instead of constructor parameter

I'm using an ORM which doesn't allow me to inject dependencies in the constructor. Let's say I'm using DDD for the business logic, and the MVC pattern for the UI. Now one of my domain objects needs ...
7
votes
8answers
874 views

how could I interview for a C# position if I master Java [duplicate]

Possible Duplicate: Interviewing a developer who's skilled in a language you don't know I must interview people for a C# position we have. I work on the java side of the project, ...
3
votes
3answers
225 views

How to improve enterprise level application that consists of only static methods

I am new in a enterprise level application project and discovered that 99% of everything I've seen in code is static methods, static properties. The application at hand is a distributed app ...
3
votes
2answers
2k views

ASP.Net MVC ambigious action methods - why the path choosen

Is there someone who could shed a light on why ambiguous methods are not allowed in ASP.Net MVC?I updated my question just to clarify it (using Carson63000 example from his answer), the question ...
7
votes
5answers
614 views

What are common Silverlight specific mistakes/pitfalls developers should avoid? [closed]

What are some common mistakes/pitfalls, specific to Silverlight development, that developers should avoid? PS: Please, if you don't have hands on experience with Silverlight and want to simply state ...
6
votes
3answers
4k views

Do private static methods in C# hurt anything?

I created a private validation method for a certain validation that happens multiple times in my class (I can't store the validated data for various reasons). Now, ReSharper suggests that the function ...
0
votes
2answers
527 views

Limitations of copy/cut paste functions in System.IO

I'm developing a desktop application (a File Manager) in C#. For copy/cut and paste operations I will use the default methods in .NET like System.IO.File.Copy() System.IO.File.Move() Are there ...
7
votes
6answers
5k views

Is Razor or XSLT better for my project? [closed]

I'm in the early stages in the design of a system that will essentially be split into two parts. One part is a service and the other is an interface with the service providing data through something ...
12
votes
4answers
2k views

What are the disadvantages of using/writting a .Net Custom Membership Provider?

Recently, I posted the following question on SO: http://stackoverflow.com/questions/7197337/using-asp-net-membership-provider-with-an-existing-user-database As you may notice, I ended up answering my ...
27
votes
4answers
33k views

Why and when should I make a class 'static'? What is the purpose of 'static' keyword on classes?

The static keyword on a member in many languages mean that you shouldn't create an instance of that class to be able to have access to that member. However, I don't see any justification to make an ...
19
votes
8answers
3k views

How to implement DRY principle when using 'using' keyword?

Consider these methods: public List<Employee> GetAllEmployees() { using (Entities entities = new Entities()) { return entities.Employees.ToList(); } } public ...
2
votes
5answers
589 views

Is it OK to Use Dropbox in a Web Installer?

So I'm working in a modding project and they gave me the installing part as to do. We plan to publish it between 30 Aug. - 01 Sept. My question is; is it logical to use Dropbox to download files in ...
2
votes
1answer
779 views

Can I develop GUI in MonoTouch and MonoDroid with a shared .NET backend?

Is it possible to create a shared backend logic using .NET and have the respective GUI front ends in MonoTouch and MonoDroid?
8
votes
7answers
1k views

What is the difference between a prototype and a production level solution?

This question is purely for learning and to step-up my technical understanding. I know there is no perfect solution and this question has possible never ending solution list but I think it's very ...
5
votes
6answers
604 views

Is this considered repeating code?

C#/ASP.net: /// <summary> /// Is a group in the basket already? /// </summary> public static bool isItemInBasket(List<BasketItem> BasketItems, int GroupID) { return ...
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 ...
-1
votes
6answers
4k views

Should I take a C# certification course to learn C#? [closed]

I'm looking to learn C# mainly so i can get into XNA. I know the basics of programming and I've tooled around with GameMaker, which has it's own scripting language. I'm not really looking to jump into ...