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

10
votes
6answers
660 views

Starting new project with TDD

I'm studying TDD and I read that it also helps you to define the design of the app, correct? So I decided to start creating a new project to help me understand it better. I want to create a simple ...
52
votes
6answers
7k 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 ...
7
votes
3answers
577 views

Is it recommendable to program .net apps with C++

From what I can understand, C# is the defacto language when coding .NET apps. Is it recommendable to program .NET apps [let that be ASP.NET, WinPhone 7, GUI, etc] in C++? What are the pitfalls and the ...
4
votes
4answers
6k views

C# Certification possibilities?

I have been studying C# for about six months at University. I would like to have something to show for my work. I know the certification scene changes from month to month and I'd appreciate if anyone ...
18
votes
3answers
2k views

Why isn't the Stab language more widely used? [closed]

I am wondering if there are technical reasons that make Stab an unsuitable alternative to Java. Stab borrows heavily from C#, bringing many C# features to the JVM: Less verbosity type inference ...
2
votes
3answers
339 views

C# Coding Standard - Position of Attribute in relation to Target

I had thought that this was one of the few solved problems in C# coding standards / style; Attributes always appear on the line above the thing to which they are applied a la [SomeClassAttribute] ...
-2
votes
3answers
727 views

do you use built in Stack/Queue/List or Vector in your program? [closed]

Yesterday i saw in a post a guy said that built in Stack/Queue are 5x slower than a normally coded Stack/queue ! Is it true ? If true then why Microsoft (C#.NET,VB.NET) or Oracle (JAVA) is giving such ...
3
votes
4answers
531 views

How do you remember encapsulation types for effective use?

I've been attempting to learn C#.NET for the past month or so, and the array of ideas that seems to always trip me up is encapsulation. As this is one of the three pillars of OOP, I feel that I am ...
0
votes
2answers
375 views

What is the most pragmatic & basic UI pattern to follow for Silverlight and/or WPF

Here is the context. The apps will: consume existing (and standard) web services. app is UI intensive (UI updated frequently and lot of data to display). development team experience level is ...
2
votes
2answers
311 views

What is the best way to store files when using winforms and web?

I have to develop an application (in C#) that has to work with files. The application consists of two versions: a web version and a windows version. Therefore, the files must be stored on a place ...
0
votes
3answers
315 views

Should I keep all my class definitions in the same class library?

I am starting to work with class libraries in my C# class. We were told to write code that can be used more than one time. Should I keep all my class definitions in one class library for the length of ...
6
votes
5answers
5k views

Learning Test Driven Development [closed]

If I want to learn TDD on my own, where would I start apart from the usual Google Search? Are there any books that you would recommend or any method that you followed to learn it on your own? I am ...
5
votes
1answer
3k views

Prefered way to declare events

I am fairly happy with my understanding of the .NET event model. I think I might be misunderstanding a small nuance of the system. When I started out putting events into my classes I would use the ...
15
votes
5answers
3k views

When and why you should use void (instead of i.e. bool/int)

I occasionally run into methods where a developer chose to return something which isn't critical to the function. I mean, when looking at the code, it apparently works just as nice as a void and after ...
3
votes
1answer
2k views

How to generate nonce for Ajax web requests

As many of you know WordPress uses "secret key" like thing for every AJAX request. Making each request unique and also 'somewhat' secure (just a step ahead than nothing). How would I implement the ...
4
votes
7answers
388 views

How long should someone take classes in a language they don't plan to work professionally in?

I was late in my signing up for classes at the start of last term, so I signed up for the only programming class I could find C++. After doing well in that class I was allowed into intermediate C#, ...
3
votes
6answers
848 views

“As” Naming Convention

I'm experimenting with a naming convention I've devised and am seeking opinion. It involves the use of an "As" infix, and at this point I am envisioning it in the context of JavaScript, C# and C++ ...
19
votes
12answers
826 views

What makes documentation good? [duplicate]

I need to write documentation for several projects I worked on. I was wondering what, according to your experience, makes documentation useful and complete. What part should I include, how deep should ...
2
votes
2answers
249 views

An event that raises itself - is it too complicated?

I have a little problem. I'm writing a resource loading and caching system, in which user can request a resource, and set a callback to be called when resource is loaded (and/or wait for load to ...
2
votes
9answers
734 views

A Newbie .NET Developer Desperately Seeking for Advice [closed]

I am becoming a little desperate. I am 23 and for the last three months I've been working as a software developer for a British Company who develop a leisure management system. Prior this job, I was ...
5
votes
1answer
2k views

What would your DB Schema look like if you are building a Reddit/Digg-like site? [closed]

Just found out something rather interesting about Reddit's database schema: The way we’ve changed is we use an “open schema”. Sometimes it’s called “entity attribute value”. It’s basically ...
3
votes
7answers
612 views

Is the rule of 10% code is comments still valid?

I've used some older languages before C# and I always felt the need to comment what I was doing so it is clear for anyone who reads the code. But now that I use C# decently, I often feel that it's a ...
3
votes
3answers
3k views

WPF4: Is this indictment of DevExpress WPF controls valid and what is a good alternative vendor?

My company is starting a major greenfield development project using DevExpress WPF controls. I just read this critical review of their WPF controls. Do you agree that DevExpress does not understand ...
17
votes
9answers
3k views

Will Java catch up with C#? [closed]

Today I posted a question asking about which language C# or Java would be better for me to study. I had some great answers. One thing that came up was that perhaps Java is now rather behind C# with ...
4
votes
6answers
677 views

C# experience for students

Where is it possible to get a real experience with C# and .net programming? Open source teams usually don't want to deal with newbies, making projects with other students is problematic too, because ...
1
vote
2answers
153 views

Technology for atoms animation

I would like to make an animation of Molecular diffusion. I have some CSV or binary file with data to create 3D scene with atoms. It has to be fast animation with diffrent camera views and ...
7
votes
8answers
440 views

Is there a way to play the role of Javascript with any other language like C#?

Is there a way to play the role of Javascript with any other language like C#? One way came up in my head is, having silverlight installed, using C# instead of Javascript for all the client side ...
0
votes
1answer
580 views

Building a table (DataGridView) while keeping decoupled from Model

I'll try to keep this simple. Small C# app, dialog based, one has a DataGridView. I've got an UpdateTable function in the form that accepts a DataSet and passes it to the DataGridView.DataSource. ...
6
votes
11answers
2k views

What is the point of properties?

Here are some arguments for properties and my counter-arguments: Easier to use than writing getter and setter methods Getter and setter method pairs are a code smell. Making it easier to write ...
9
votes
4answers
1k views

Should I be a professional in C# programming in order to build good web applications using ASP.NET?

I do not know if there is special programming in C# for the web or it is the same?. If it is the same then what are the topics that I should focus on in C# in order to use it building web application ...
8
votes
2answers
498 views

Which GOF design patterns are already implemented as first-class language features in C#?

(This question was closed on Stack Overflow due to being "too broad" and "not a real question" so maybe it's more appropriate here?) Inspired by this question. We know events are a language-level ...
3
votes
6answers
4k views

C# Unit Testing In A Single Project

Alright, so I'm doing my first "real" C# project. I'm chugging along, enjoying myself, nice little language I've got here, fairly easy to use, la ti da. Then I get to the point that I realize ...
11
votes
6answers
573 views

Open Source Etiquette

I've started working on my first open source project on Codeplex and came across some terrible code. (I did learn that C# still has the "goto" statement) I started adding features that the "owner" ...
3
votes
2answers
593 views

Resources or advice useful coming to C# from python 2.7.1

I'm a python monkey at heart. I eat drink sleep and dream in it, and have found that it's taught me much more about writing quality code than my degree in Computer Science ever did, however I've been ...
3
votes
1answer
257 views

Merging functionality from two controllers; should I place all actions in one controller?

Say I have 2 controllers, OrderController and StatusController. OrderController has several CRUD actions for Orders and StatusController has several actions pertinent to changing the satus of Orders ...
2
votes
1answer
1k views

Which are C# 4.0 programming paradigms?

Which are C# 4.0 programming paradigms? In what category does extension methods fall into? A programming language can support multiple paradigms. For example, programs written in C++ or ...
3
votes
2answers
724 views

Designing tool for C#

I have seen few developers use a tool for designing their application where they simply dragged needed elements (classes, variables, objects) and just did magic work. Then there was a button to ...
1
vote
1answer
438 views

.net data access technology

Iam new with .Net technology and i need a help with choosing correct path of creating application. I want to create application that get its data from web-service and small part from local SQLCE ...
15
votes
11answers
2k views

Should I break contract early? [closed]

About 7 months ago I made the switch from a 5 year permie role (as a support developer in C#) to a contract role. I did this because I was stagnating in my old role. The extra cash contracting is ...
7
votes
2answers
919 views

Shifting between XML schemas and C# classes in a sensible fashion

A .NET/C# system receives XML messages for processing and further transmission. Since working directly on XML documents would be very inconvenient, it is necessary to deserialize the message to a C# ...
18
votes
7answers
6k views

How far should 'var' and null coalescing operator '??' be entertained without hampering readability?

I know the title of the question is very subjective, but I was confronted with usage of ?? operator by my peers, where at the same time I was not very happy/comfortable with applying var in new ...
10
votes
2answers
700 views

How can I use my coding skills for good?

By this autumn my two small websites should be generating around a total of $1200 a month with minimal/zero input which is enough to for me to live on comfortably enough. Rather than embark on ...
17
votes
9answers
589 views

Should if statments be in inner or outer method?

Which of these designs is better? What are the pros and cons of each? Which one would you use? Any other suggestions of how to deal with methods like is are appreciated. It is reasonable to assume ...
3
votes
2answers
6k views

ASP.NET MVC 3 (C#) Software Architecture

I am starting on a relatively large and ambitious ASP.NET MVC 3 project and just thinking about the best way to organize my code. The project is basically going to be a general management system that ...
5
votes
1answer
402 views

Have any of you used MEF to configure Castle Windsor

I am thinking of using MEF to manage the fluent interface on Castle Windsor. Allowing for me to swap out different sections of the system for test and production. Has anyone done this if so how well ...
5
votes
7answers
718 views

Design Code Outside of an IDE?

Does anyone design code outside of an IDE? I think that code design is great and all but the only place I find myself actually design code (besides in my head) is in the IDE itself. I generally ...
2
votes
4answers
2k views

Should I be learning Linq, Direct SQL Commands (in .net), EF or other? [closed]

Basically, I have a very good knowledge of plain old SQL coming from Classic ASP programming. Over the past couple of months, I have been learning C# and today was my first full day at MVC 3 (Razor) ...
6
votes
4answers
1k views

Adding to the System namespace in C#

Would it be acceptable for some very generic utilities or classes to be added in the System namespace? I'm thinking of really basic stuff like a generic EventArgs (EventArgs<T>), Use case: ...
3
votes
9answers
1k views

Which is better: many class definitions in the same file or every class definition in a separate file?

Which is better: many class definitions in same file or every class definition in separate file? Examples: 1) Many classes in same file. Say, myManyClasses.cs: namespace myPack { class ...
6
votes
3answers
779 views

How can I reduce the amount of time it takes to fully regression test an application ready for release?

An app I work on is being developed with a modified version of scrum. If you are not familiar with scrum, it's just an alternative approach to a more traditional watefall model, where a series of ...