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

6
votes
1answer
777 views

Why would you create a deployment script in PowerShell when you have TFS?

I'm experimenting with automatic deployment / continuous integration and had a talk with my team lead. I told him I'm investigating creating build/deployment scripts in PowerShell and he said ...
-5
votes
1answer
3k views

What are Dependency Injections and why are they useful? [closed]

I have heard of ninject and I have to build a lot of apps that have to integrate with other tools. SO i was wondering what this was and how it is used.
19
votes
9answers
8k views

Why are people so strongly opposed to #region tags in methods?

I hear a lot about keeping methods short and I've heard a lot of programmers say that using #region tags within a method is a sure sign that it is too long and should be refactored into multiple ...
6
votes
4answers
816 views

Mastering technology like LINQ, WCF really necessary or is OOPS enough?

I am a C# developer. My observation of the IT industry as a C# developer is that the technology keeps changing or being updated by Microsoft like LINQ, WCF, and WPF etc. OOP has been the fundamental ...
11
votes
3answers
4k views

Is it a good practice set connection strings in a web config?

Recently I have a discussion with some of my colleagues at my work because they said that it's better have in a .DLL a string connection encrypted. And I said why just don't use the string connection ...
15
votes
6answers
2k views

From Delphi to C# for Dummies

I'm a Delphi and C# coder and have been given the assignment to introduce the most fundamental concepts of .Net/C# to my coworkers in some trainings. They are seasoned Delphi Win32 coders but still ...
8
votes
3answers
9k views

Difference between various Collection Generic Interfaces in C#

I have been playing around with C# for Windows and ASP.net MVC development for some time now. But I am still unclear on a few areas. I am trying to understand the basic difference between and ...
52
votes
11answers
6k 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 ...
2
votes
5answers
1k views

Data Scraping - One application or multiple?

I have 30+ sources of data I scrape daily in various formats (xml, html, csv). Over the last three years Ive built 20 or so c# console applications that go out, download the data and re-format it into ...
-1
votes
6answers
472 views

Should I open up to .net, c# and visual basic? [closed]

I am a huge linux fan and have been ignoring .net, C#, and visual basic due to their relationship with Microsoft. Am I foredooming them just for their relationship? Is there any advantage to ...
13
votes
7answers
29k views

The dreaded C# programming interview test - any advice?

I have a possible C# dev job lined up but before I can interview, I need to pass a test with the employment agency. Now even though I am a senior developer with over 10 years of programming ...
0
votes
2answers
2k views

Is this a correct way to use nested classes to keep track of data?

I have some instruments. Each instrument should have a name (string) and description (string). Each instrument can have some setups, which these setups are each a series of commands(string[] or ...
5
votes
7answers
2k views

Where should I put my utility methods?

I am very new to Visual Studio and C# and am wondering how best to create a repository of sorts for utility methods. For instance, we need a method that returns the current fiscal year and other ...
5
votes
3answers
2k views

When should a class or module be in a separate Assembly/DLL?

Are there any guidelines for deciding when a class should be in its own assembly/DLL? I often see two schools of thought: 1) Every "grouping" of classes belongs in its own DLL e.g. Repositories, ...
1
vote
1answer
193 views

Clarification about Event Producer in StreamInsight

I need a small clarification about StreamInsight, I know by doc's that StreamInsight can handle multiple concurrent Events. But will the event producer be a separate function, for ex: I need to watch ...
6
votes
2answers
751 views

How to maintain a demo version of an application?

I need to be able to demo our production application to prospective clients. The way I have it setup today is simple. The demo application is an exact duplicate of the production system, except that ...
4
votes
5answers
14k views

How long would it take for someone completely new to programming to get enough knowledge to make it to the job market as a junior programmer?(C#) [closed]

I just want to know how long would it take me to become proficient enough (in let's say C#) in order to be able to get into the job market as a junior/entry level programmer. I have read all those ...
5
votes
5answers
1k views

Using a SetProperty method to prevent accidental changes to a property

Is it good/bad practice to do the following: public class MyClass { public MyType MyProperty { get; private set; } public void SetMyProperty(MyType myProperty) { MyProperty = myProperty; } ...
4
votes
4answers
286 views

How do you proactively guard against errors of omission?

I'll preface this with I don't know if anyone else who's been programming as long as I have actually has this problem, but at the very least, the answer might help someone with less xp. I just stared ...
1
vote
1answer
461 views

instantiate or initialize when using a new class?

my question is rather a matter of English language. For proper commenting my code I want to know when you do for example the following code, what comment you can write for it? public class TestClass ...
6
votes
2answers
542 views

Implementing Asynchronous Insert / Update for a web application

I am in the process of implementing a small web application using memcached for caching objects and sql server for database persistence. In all the projects I have done before I have done ...
6
votes
2answers
1k views

The need for Explicit Type Conversion in C#

Consider the following code: DerivedClass drbObj = (DerivedClass)obj; Here obj is of type Object and this is reasonable since Object is the base type of every Class in C#. Here, since the type of ...
8
votes
4answers
509 views

What can and can't the Garbage Collector do?

Will the GC take care of all memory management issues (memory leaks) ? Is there any case where you don't want the GC to take control of some part of your code ?
27
votes
14answers
2k views

Newbie seeking advice on programming in general [closed]

need some of you to remember back to a time when you might have been bad at programming... Been at my new job (as a software developer) for a couple of months now, passed probation period. Have very ...
4
votes
3answers
2k views

What are the pros and cons of the MVVM architecture?

In class today we were introduced to the MVVM architecture for Silverlight/WinPhone/WPF; it looks nice for big projects, but what are your thoughts on MVVM? What are the pros and cons? I want to get ...
2
votes
2answers
200 views

Are there standard strategies for defining job flow and dependencies?

I'm working on a project that involves the chaining of separate jobs into a single master job, though there may be parallel paths in the chain leading up to the final output. Job and chain details ...
2
votes
1answer
486 views

How should I go about learning PHP given a background in C#.NET?

I have developed a few websites and applications using C#, and lately I've been developing a website in ASP.NET MVC. To be honest, this has pissed me off somewhat as it has me feeling like I have zero ...
2
votes
2answers
445 views

Why is there usually a reference to Java when when people talk about C#?

I don't know much about C# but I've been programming in Java for a few months now. I had always heard what C and C++ were, but was a little curious about where C# came from. I'm a little confused ...
-1
votes
4answers
2k views

Is there a canonical book for learning C# from scratch? [closed]

I was looking for a good C# book for beginners to learn the language fundamentals and OOP fundamentals, however, every book I have looked at seems to start quickly and does not touch the fundamentals ...
1
vote
3answers
171 views

How to allow filtering Films in my app intuitively? (GUI design)

I am not sure if this is the right place to ask this but I wrote an app that shows all the movies in one's computer with the appropriate info such as genre, director, rating, etc. I am wondering how ...
1
vote
5answers
2k views

Transitioning To Java [duplicate]

I'm primarily a VBA/VB3-6/VB.Net developer of 15+ years with several years of C# experience. Myself and another developer (a seasoned senior level java developer) were hired on at this new company at ...
15
votes
3answers
7k views

How will C# 5 async support help UI thread synchronization issues?

I heard somewhere that C# 5 async-await will be so awesome that you will not have to worry about doing this: if (InvokeRequired) { BeginInvoke(...); return; } // do your stuff here It looks ...
2
votes
3answers
533 views

Which is most important to learn OOP first or to learn the OOP language you want to learn?

I face a problem nowadays, I have a really good book that explain OOP but it uses a language which I do not want to learn which is Java because my goal is to learn C#. And I don't know if I should ...
9
votes
1answer
9k views

Which microsoft qualification should a C# ASP.NET Web developer work towards? [closed]

I've been working as a vb.net ASP.NET web developer for the past 4 years, and I'm currently making the change over to C# Apart from school/sixth form qualifications, I'm currently lacking any ...
5
votes
4answers
5k views

Which Resource Would Be Best for Learning C# / .Net? [closed]

I'm a PHP / Java / Objective-C programmer, looking to finally learn some MS technologies, to increase my marketability, etc. I am looking at these two books, can anyone experienced in the field ...
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 ...
1
vote
2answers
1k views

Why should company choose VB.NET over C# [duplicate]

Possible Duplicate: VB.Net vs C# debate Are there any actual reasons why company should choose VB.NET over C#? I work for a company which develops medical software and switched from VB6 to ...
4
votes
6answers
652 views

What are ways I can speed of development time when building applications? [closed]

I noticed that overtime with experience that the curve of learning shifts from trying to learn a language or technology (the way it works) to how to develop applications faster and with less code. I ...
4
votes
1answer
417 views

Architecture: for a Single website to be supported for different Clients

I have developed a system with one company profile. The system is built using WCF services, asp.net. Now another company wants to use our system as well. And they might need some customization and ...
12
votes
6answers
2k views

Solutions to C# 5 async re-entrancy

So, something's been bugging me about the new async support in C# 5: The user presses a button which starts an async operation. The call returns immediately and the message pump starts running again ...
1
vote
3answers
872 views

Coding to interfaces

I understand why it is a good idea to code to an interface rather than to a concrete class. I find it hard to implement though as other methods generally need to use properties of the given object. ...
16
votes
9answers
5k views

Whether to put the business logic in Stored Procedure or Not?

There is always a debate over the topic - "Whether to put the business logic in Stored Procedure or Not?". If we decide not to use the ORM Tool and not to put the Business Logic in Stored Procedure ...
1
vote
6answers
3k views

Why declare variables close to where they are used?

I have heard people say that variables should be declared as close to their usage as possible. I don't understand this. For example, this policy would suggest I should do this: foreach (var item in ...
4
votes
3answers
1k views

LINQ to SQL - Business logic in another assembly?

So I am trying my hand at this whole tiered application thing with ASP.NET 4. The software I've developed is a maintenance nightmare and it isn't very well organized. I've done some looking around ...
10
votes
8answers
9k views

Practical way to store a “reasonably large” amount of data that hardly ever changes?

Think in terms of pre-computed lookup tables or something. At what point does it make more sense to use a database instead of hardcoding values in my application? The values are not going to change, ...
10
votes
4answers
3k views

Learning path for web developer .NET or Java [closed]

I am interested to know how many real world web application servers are hosted by windows? I am going to learn C# and ASP.NET and want to convert my self from an embedded developer to a web app ...
4
votes
5answers
8k 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
138 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: ...
20
votes
3answers
14k 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, ...