The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [.net]

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++.

Filter by
Sorted by
Tagged with
10
votes
3answers
4k views

How can I get started as a freelance programmer?

Assume that I know zero about freelancing, but I am a good .NET programmer. I want to start freelancing. How would I get started?
10
votes
5answers
12k views

Windows Service or Windows Task Scheduler?

I am planning to create a utility, which will query the database and store some information (on another table in the database). Its a multi-threaded utility and require to run for every 5 or 10 ...
10
votes
4answers
2k views

Best practice with branching source code and application lifecycle

We are a small ISV shop and we usually ship a new version of our products every month. We use Subversion as our code repository and Visual Studio 2010 as our IDE. I am aware a lot of people are ...
10
votes
3answers
4k views

What is an “application model”?

Currently I'm studying .NET Core and in the early docs which first introduced .NET Core we see that talk about the many different verticals. This can be seem in this picture: In all the verticals we ...
10
votes
2answers
1k views

Should my async task library swallow exceptions quietly?

I've just learned that .NET 4.5 introduced a change to how exceptions inside a Task are handled. Namely, they are quietly suppressed. The official reasoning for why this was done appears to be "we ...
10
votes
2answers
707 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 ...
9
votes
10answers
13k views

Switch from C# to Java, which “gotchas” I should care?

I may have to switch to Java for new project. I have very little knowledge about Java, because I've mainly studied and used C#, and I'm afraid of the differences between these two language/platform ...
9
votes
6answers
10k 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 ...
9
votes
7answers
48k views

string.format with variables vs inline variables

What are the pros/cons (if any) to using string output; int i = 10; output = string.Format("the int is {0}", i); versus string output; int i = 10; output = "the int is " + i; I have always used ...
9
votes
4answers
536 views

Training a 'replacement', how to enforce standards?

Not sure that this is the right stack exchange site to ask this of, but here goes... Scope I work for a small company that employs a few hundred people. The development team for the company is ...
9
votes
8answers
2k views

I have one afternoon to extol the benefits of .NET over VB6… what do I say? [closed]

My company is a small twenty-man engineering firm. All the application programming here is done in VB6 by two people, who have taught themselves VB6 from an assembly background while working here for ...
9
votes
6answers
5k views

How to develop line-of-business tablet apps as a .NET developer? [closed]

My company has a lot of experience in .NET development, and one of our products in an ERP system. Recently, a customer asked us if we could provide a tablet interface to that system, i.e., a software ...
9
votes
6answers
4k views

Why is it recommended to close all programs before installing a new program?

What kind of problems arise from installing a new program while other programs are running? I'd imagine the GAC solved a lot of the old problems of shared dll's being locked. So what kind of issues ...
9
votes
1answer
676 views

Naming of related classes and interfaces

I have created an ObjectParser class which parses data into strongly typed objects using an IObjectParserDataSource as the data source (the data could be an Excel file, text file, array, query string, ...
9
votes
6answers
1k views

What are good ways of balancing informative exceptions and clean code?

With our public SDK, we tend to want to give very informative messages about why an exception occurs. For example: if (interfaceInstance == null) { string errMsg = string.Format( "...
9
votes
3answers
3k views

Is 'using' appropriate in a context where there is nothing to dispose?

In C#, using statement is used to dispose in a deterministic manner the resources without waiting for garbage collector. For example, it may be used to: Dispose SQL commands or connections, Close ...
9
votes
6answers
437 views

How do I get over my .NET hump? [closed]

I've been teaching myself how to write code with the help of a very talented friend, who unfortunately is talented enough that he has never free time. I've read and worked out of a couple books, but I ...
9
votes
2answers
2k views

In .NET (Visual Studio), when do you create a new assembly?

I'm working on a Silverlight application. I've split it up in several assemblies: Domain Repositories (everything with persisting to the Sterling database) UI ... This is how I've learned it, but I ...
9
votes
4answers
6k views

.NET Programming and POCO classes

I was having a think tonight while pondering over some application I need to change and it got me thinking. Entity Framework Entities are POCO (Plain old CLR Objects) and models used in ASP.NET MVC ...
9
votes
4answers
5k views

Was .NET's IObserver<T> intended for subscribing to multiple IObservables?

There are IObservable and IObserver interfaces in .NET (also here and here). Interestingly, the concrete implementation of the IObserver does not hold a direct reference to the IObservable. It doesn'...
9
votes
1answer
8k views

What should be done with class names that conflict (common) framework names

What should be done exactly when the most obvious class name for a component is taken by a framework? In my case, I need to make a class that describes an HTTP request. Of course, the most common name ...
9
votes
4answers
10k views

Separation of retrieving data and business objects between DAL and BLL Layers

I did some research before posting this question. Among other questions or post, one of those is provided below. I could not get a clear mind how to determine.. Business Objects within a Data Access ...
9
votes
1answer
2k views

Blurring the lines between async and regular functions in C# 5.0

Lately I can't seem to get enough of the amazing async-await pattern of C# 5.0. Where have you been all my life? I'm absolutely thrilled with the simple syntax, but I'm having one small difficulty. ...
9
votes
2answers
1k views

What are the best practices for phasing out obsolete code?

I have the need to phase out an obsolete method. I am aware of the [Obsolete] attribute. Does Microsoft have a recommended best practice guide for doing this? Here's my current plan: A. I do ...
9
votes
3answers
1k views

How would I design a TryParse method which provides detailed information in case of a parsing error?

When parsing user input, it is generally recommended to not to throw and catch exceptions but rather to use validation methods. In the .NET BCL, this would be the difference between, for example, int....
9
votes
3answers
1k views

Why do we have so many flavors of .NET? Is it a good thing? [closed]

There are many "flavors" of the .NET Framework: Full ("normal") Client profile subset Silverlight in web browsers "Silverlight" on Windows Phone Compact framework WinRT When C# code is needed on a ...
9
votes
2answers
3k views

How viable is “Windows Workflow Foundation”? What alternatives should I consider? [closed]

I started learning WF 3.0 back a few years ago and never quite got the hang of it. Has anyone learned WF 4.0 (now that it has been rewritten)? Is it a viable platform worth considering? What ...
9
votes
2answers
412 views

Should `Vector<float>.Equals` be reflexive or should it follow IEEE 754 semantics?

When comparing floating point values for equality, there are two different approaches: NaN not being equal to itself, which matches the IEEE 754 specification. NaN being equal to itself, which ...
9
votes
4answers
1k views

Using struct to enforce validation of built-in type

Commonly domain objects have properties which can be represented by a built-in type but whose valid values are a subset of the values which may be represented by that type. In these cases, the value ...
9
votes
3answers
2k views

WinRT and .NET: What is it, where do i place it and what does it change?

Say I'm a .NET developer and want to build my application on WinRT. What I've read is that it is a completely new API for Windows 8, strongly related to Metro-style apps. I'm assuming that I can ...
9
votes
2answers
3k views

Which data should be stored as `Claim`?

In ASP.Net Core, I find Claims authorization is very not-concrete method. We can add anything as ClaimType and ClaimValue pair; groups, firstname, lastname, brithdate, canAccessThisURI, isEditor, etc.....
9
votes
1answer
646 views

Is the upgrade path from Win32 to .NET to WinRT feasible?

I support a VB6 application. It's currently being replaced, module by module, with .NET (including a lot of new features as we go). The GUI is in WPF, but with almost zero coupling to the business ...
9
votes
4answers
13k views

Patterns and practices for Web Scraping in .Net (C#) [closed]

I will be putting together an application to automate an external web site/application. In some instances I will need to navigate the site as a user would (some links I need to follow cannot be ...
9
votes
2answers
289 views

RSpec + Selenium tests for .NET on Windows

I'm a Rails developer doing TDD on a Mac with RSpec, Capybara and Selenium webdriver. Now I have been asked by my company to use this approach for a .NET on Windows environment. What is the best way ...
8
votes
15answers
1k views

Is knowing .NET only enough for a successful career in IT industry? [duplicate]

Possible Duplicate: Is it better to specialize in a single field I like, or expand into other fields to broaden my horizons? Recently, I don’t know from where I got a thought in my mind that, “is ...
8
votes
8answers
1k views

What are the consequences of still sticking with Windows XP despite there are Windows Vista, 7 and very soon 8? [closed]

From a .Net programmer perspective, what are the consequences of still sticking with Windows XP despite there are Windows Vista, 7 and very soon 8? How does having windows XP limit programmers ...
8
votes
9answers
7k views

Multithreaded file copy

There is an utility we have which is used to upload files (and perform other operations on the file) to a network shared location. The file size tends to vary from a few mb to 500 mb. A suggestion has ...
8
votes
3answers
2k 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 ...
8
votes
9answers
1k views

How to inspire an intern with programming? [closed]

The situation is this - we took an intern for a summer with a mind that if he will catch up during summer, we will keep him as a part time junior developer. We took him after his first year in ...
8
votes
3answers
440 views

Using a Public Property AND a Public Field

Where I work, using Properties are discouraged. We have code generation tools to "speed things up". All object data ends up being Public fields. If you request properties anyway, you get something ...
8
votes
8answers
3k views

Is using something other than XML advisable for my configuration file?

I have a small tool I'm designing which would require a configuration file of some sort. The configuration file in my case is really more of a database, but it needs to be lightweight, and if needed ...
8
votes
7answers
7k views

How to enforce implementation of interface to behave a certain way

Suppose you had the following interface public interface IUserRepository { User GetByID(int userID); } How would you enforce implementers of this interface to throw an exception if a user is not ...
8
votes
6answers
2k views

Would you re-design completely under .Net?

A very extensive application began as an Access-based system (for database storage). Forms were written in VB5 and/or VB6. As .Net became a fixture in the development community, certain modules have ...
8
votes
2answers
522 views

Why is Flags Enumeration considered an intermediate skill?

I was reading this article: Designing Flags Enumerations @ msdn and it says Combining flags enumeration values is an intermediate skill that should not be required for developers implementing ...
8
votes
8answers
2k views

How should I introduce a coding standard to my team?

First a bit of background: My current development manager is taking another opportunity the end of this week, leaving our team with four fulltime developers, a part-time intern and a web designer (...
8
votes
4answers
13k views

I want to master ASP.NET - What concepts should I focus on/What concepts do you most value? [closed]

I start a job this summer doing work in ASP.NET 4 (C#). I plan on working with some legacy code as well as MVC. I want to get a running start. I have good understanding of HTML/CSS/Javascript, and ...
8
votes
8answers
2k views

Justification for learning/implementing newer Microsoft technologies [closed]

I work at a large healthcare organization as a mid-level software developer. I have over 10 years experience in the IT industry using Microsoft technologies (ASP.NET & SQL Server). When I go to ...
8
votes
6answers
3k views

How is encapsulation used for safety?

I am learning OOP. I have studied much about encapsulation but the more I read the more I became confused. I understand we hide (by making private) data and expose it to user of class (other ...
8
votes
2answers
6k views

Will .NET 4.5 Make the Reactive Extensions Obsolete?

Among other things, .NET's Reactive Extensions simplify concurrency management. From what I've heard, .NET 4.5 will simplify concurrency management with things like the await keyword. My Question: ...
8
votes
2answers
3k views

Does LINQ require significantly more processing cycles and memory than lower-level data iteration techniques?

Background I am recently in the process of enduring grueling tech interviews for positions that use the .NET stack, some of which include silly questions like this one, and some questions that are ...