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

1
vote
5answers
703 views

Worst practices in developing database applications [closed]

In constrast to http://programmers.stackexchange.com/questions/123591/database-design-good-practices I wanted to ask: What are the top worst practises you encountered when having to work with other ...
17
votes
3answers
17k views

Best design for Windows forms that will share common functionality

In the past, I have used inheritance to allow the extension of Windows forms in my application. If all of my forms would have common controls, artwork, and functionality, I would create a base form ...
8
votes
4answers
6k views

What should I do to get started with Windows 8 app development?

I'm looking to get into Windows 8 app development, and from what I understand I should be mastering XAML and C#. Now, there aren't any good tutorials on the internet about Windows 8 yet, but there ...
4
votes
1answer
127 views

How to detect impacts caused by changes?

I've often run on this problem. Now I am working on a team of 4 and we built a lot of stuff. We are still finishing somethings and making changes. The problem is that those changes can (and most ...
8
votes
2answers
925 views

Ideal data structure/techniques for storing generic scheduler data in C#

I am trying to implement a generic scheduler object in C# 4 which will output a table in HTML. Basic aim is to show some object along with various attributes, and whether it was doing something in a ...
6
votes
3answers
3k views

Ordered enumeration: IEnumerable or Array (in C#)?

Typical context: I make an extension method for a collection which considers that the elements are ordered. The function starts at the beginning, at index 0, and the order has significance. Examples: ...
10
votes
2answers
10k views

Use-cases for node.js and c#

I do quite a bit of ASP.NET work (C#, MVC), but most of it is typical web development. I do Restful architecture using CRUD repositories. Most of my clients don't have a lot of advanced requirements ...
2
votes
2answers
240 views

Moving legacy application to a testable framework?

We have a web application which contains a web service with over 50 methods. The application is currently installed at a number of sites and is currently being maintained by one developer. The ...
2
votes
3answers
913 views

Writing to event log - best practice if log is full

I have an application that writes to its own Event Source. The Event Source itself is created upon install to prevent user vs admin access issues at runtime. Should writing to our own Event Source ...
3
votes
2answers
1k views

Bill of materials database design in EF codefirst?

I'm having trouble generating a proper database design for bill of materials in EF Code-first I just need a general structure then ill add additional fields So i need to have a Product that is ...
2
votes
4answers
5k views

What are the tools/frameworks used to build C# ASP.net applications? [closed]

I am basically a java programmer who wants to move to .net. I haven't worked in .NET companies so I don't have any idea about the tools they use. In a Java company people use Maven, Hibernate and ...
6
votes
3answers
8k views

Practical size limits of a Hashtable and Dictionary in c#

What are the practical limits for the number of items a C# 4 Dictionary or Hashtable can contain and the total number of bytes these structures can reasonable contain. I'll be working with large ...
6
votes
3answers
609 views

Programming standards and principles to become better programmer [closed]

I am a c# developer. I have always been interested in increasing my skills and knowledge and trying to pickup new technology. However now I want to enhance my knowledge in Programming standards and ...
1
vote
3answers
864 views

Event subscription from nested classes

Is it OK to have a nested class raise an event and for the parent class that subscribes to that event subsequently raise another event, which it's parent class has subscribed to - thus passing the ...
1
vote
3answers
209 views

Should controls on a form be prepared in a separate class?

I have a form with several controls on it. Every control has to be declared in the class, formatted in the constructor (-size, location, event subscription etc), and its event-handlers declared, ...
7
votes
3answers
2k views

Is there any technology similar to LINQPad for compiling C# that runs in a browser? [closed]

Think JSFiddle. LINQPad is pretty sweet for fast C# with similar options. Is there anything like LINQPad that runs in a browser?
3
votes
1answer
765 views

Software Agent construction guidelines

I'm currently studying a Master in Computer Science and I am interested in working with Software Agents and C#. I have found so much information regarding theoretical aspects but just a few articles ...
1
vote
1answer
1k views

How to load text files into memory-mapped files

I have a number of large text files that I need to manipulate in a highly performant manner. I've decided to look into using Memory Mapped files in C# (.NET 4). However, I can't find any examples of ...
3
votes
6answers
469 views

Learning C# in a unified manner

Microsoft technologies keep getting better but they do so on the expense of adding one more abstraction layer every time. In the early stages we used to play with C# code and SQL procedures to perform ...
2
votes
3answers
320 views

How to update display during large processing job

I have an ASP.NET C# application that needs to go off and iterate through a directory of .xml files and do some processing on the data inside them. This is easy enough, but i need to display the ...
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(); ...
7
votes
2answers
466 views

How should I handle logging when I create libraries for others?

All. I am creating some libraries for other teams in my company. They all have different logging mechanisms. I want to provide trace information of what my libraries are doing. What should I to ...
2
votes
3answers
2k views

I want to write a 2-player web-based board game. Which framework should I use? [closed]

I am a C# software developer. I was recently approached by a client to develop a multiplayer board game (max 4 players). I fiddled around with WCF, WPF and EF 4.1 to get something going but I keep ...
3
votes
1answer
258 views

What are the relative merits for implementing an Erlang-style “Continuation” pattern in C#

What are the relative merits (or demerits) for implementing an Erlang-style "Continuation" pattern in C#. I'm working on a project that has a large number of Lowest priority threads and I'm wondering ...
11
votes
10answers
3k views

Converting Fortran 77 code to C#

I'm trying to convert a Fortan77 program to C#. I have a subroutine with about 650 lines of code and horrific GOTO statements all over the place. I'm having a lot of trouble even starting to visualise ...
17
votes
6answers
55k views

How should data be passed between client-side Javascript and C# code behind an ASP.NET app?

I'm looking for the most efficient / standard way of passing data between client-side Javascript code and C# code behind an ASP.NET application. I've been using the following methods to achieve this ...
0
votes
2answers
869 views

How are interrupts implemented in practice? [closed]

Consider an USB device that is receiving data over a wireless network and an application running on the PC is reading this data. Now, on many languages (consider C# DataReceived), we have event ...
0
votes
6answers
2k views

Single Line Conditions and Loops - Best Practice [duplicate]

Possible Duplicate: Should curly braces appear on their own line? Which would be a better way to format single line loops and conditions in C Sharp if (i < j) { arr[i] = sum; } ...
2
votes
1answer
2k views

How to choose a good namespace name? (Linguistically)

English in not my native language, therefore it is a little more difficult to pick a good name for a namespace. One example to make you see my problem a bit better: We have a set of classes that have ...
6
votes
3answers
6k views

Understanding and developing web services

This question is in conjuction with How would you approach developing a Hotel Reservation System? The solution to a system with different interfaces (or clients I should say) is to go with developing ...
5
votes
3answers
457 views

Architecture Question

I am writing a rules/eligibility Module. I have 2 sets of data, one is the customer data and the other is the customer products data. Customer data to Customer products data is one to many. Now I ...
2
votes
1answer
350 views

Meta-licensing of applications

I'm currently evaluating license management solutions for our customized and project-based applications, which are supported by a single server in the intranet of the customer. The applications use ...
8
votes
3answers
2k views

How much C/C++ knowledge is needed for Objective-C/iPhone development?

First, a little background. I'm a .Net developer (C#) and have over 5 years experience in both web development and desktop applications. I've been wanting to look into iPhone development for some time ...
6
votes
6answers
1k views

What's a good approach to adding debug code to your application when you want more info about what's going wrong?

When our application doesn't work the way we expect it to (e.g. throws exceptions etc.), I usually insert a lot of debug code at certain points in the application in order to get a better overview of ...
4
votes
2answers
1k views

“Worker object pool” pattern?

In my application requests are processed by objects of Processor-derived classes, something like CreateItemProcessor or MoveItemToGroupProcessor. Base Processor class implements most of common ...
18
votes
5answers
3k views

What naming convention for C# file that contains multiple classes?

In C# projects, we frequently group small and tightly related classes into the same .cs file. This practice reduces the friction of dealing with a myriad of files containing close to no actual code. ...
13
votes
7answers
5k views

How does throwing an ArgumentNullException help?

Let's say I have a method: public void DoSomething(ISomeInterface someObject) { if(someObject == null) throw new ArgumentNullException("someObject"); someObject.DoThisOrThat(); } I've been ...
2
votes
6answers
520 views

What is the best design decision approach?

I have two classes (named MyFoo1 and MyFoo2) that share some common functionality. So far, it does not seem like I need any polymorphic inheritance but, at this point, I am considering the following ...
4
votes
2answers
844 views

Piece of code for interview debugging abilities test?

May be someone has a piece of code, that would work as a test for debugging abilities? We will give ability to use Visual Studio, so it should be hardly solvable by doing manual tracing and show us, ...
4
votes
3answers
1k views

Showing real time data using WCF call (silverlight)

Currently I have a WCF method which brings back all the data from the db and binds it to a grid, but I would like to call this method regularly to get the updated data back each time, to show the user ...
2
votes
2answers
290 views

How can I permute pairs across a set?

I am writing a bet settling app in C# and WinForms. I have 6 selections, 4 of them have won. I know that using the following formula from Excel: ...
4
votes
4answers
1k views

Why are public and private accessors considered good practice? [duplicate]

Possible Duplicate: When are Getters and Setters Justified Why exactly is having public and private accessors like these: private string foo; public string Foo { get { ...
9
votes
3answers
1k views

Being prepared for a code review as a developer?

I am looking for some ideas here. I read the article How should code reviews be Carried Out and Code Reviews, what are the advantages? which were very informative but I still need more clarity on the ...
6
votes
3answers
752 views

Is it bad idea to use flag variable to search MAX element in array?

Over my programming career I formed a habit to introduce a flag variable that indicates that the first comparison has occured, just like Msft does in its linq Max() extension method implementation ...
5
votes
2answers
1k views

Are there any good examples of open source C# projects with a large number of refactorings? [closed]

I'm doing research into software evolution and C#/.NET, specifically on identifying refactorings from changesets, so I'm looking for a suitable (XP-like) project that may serve as a test subject for ...
5
votes
5answers
3k views

Can anyone help solve this complex algorithmic problem?

I got this question in an interview and I was not able to solve it. You have a circular road, with N number of gas stations. You know the amount of gas that each station has. You know the amount of ...
14
votes
2answers
1k views

Abstract exception super type

If throwing System.Exception is considered so bad, why wasn't Exception made abstract in the first place? That way, it would not be possible to call: throw new Exception("Error occurred."); This ...
4
votes
3answers
569 views

Does Java have automatic memory management?

I have started learning about C# and I come to what is called 'Automatic memory management' or 'Garbage collectors' and I'm wondering if Java contains something like this as well? and if it does, does ...
1
vote
3answers
633 views

Guidance for a C# developer to become better UI developer

I am a C# developer and had developed simple websites in regular asp.net(with asp.net controls) and a wpf application. Nowadays, I am trying to learn Asp.net MVC3 and I have been exposed to HTML ...
6
votes
5answers
347 views

Where to go from here, how to improve / learn more [duplicate]

Possible Duplicate: I'm graduating with a Computer Science degree but I don't feel like I know how to program I finished University around 4 years ago double degree in Software ...