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

learn more… | top users | synonyms

-2
votes
0answers
24 views

What's a good way to get introduced into TFS and MSBuild? [on hold]

I'm to the point where I need to make TFS do some custom stuff. That whole world is seeming to be pretty opaque. Between process XAMLs, .targets files everywhere, what's TFS and what's MSBuild, and ...
-3
votes
0answers
25 views

Transparent ListBox can't see items [migrated]

I created new control then inherit listbox ... as follow: Public Class TransparentListBox Inherits ListBox Public Sub New() MyBase.New() Me.SetStyle(ControlStyles.UserPaint, ...
14
votes
7answers
3k views

What is the “right” way to implement DI in .NET?

I'm looking to implement dependency injection in a relatively large application but have no experience in it. I studied the concept and a few implementations of IoC and dependency injectors available, ...
0
votes
1answer
79 views

ThreadPool.QueueUserWorkItem is this example a valid use case?

I need to send out a batch of reminder emails, never more than 100 emails per batch, using authenticated SMTP. This is happening on a WindowsService (no GUI). The SMTP library we're using raises a ...
4
votes
3answers
3k 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 ...
0
votes
1answer
34 views

DB Data structure for .Net sequenced list with insert, delete, move

The problem is maintaining in .net a list of rows that have a specific sequence where rows can be inserted, moved and deleted, and being able to save and restore that sequence from disk. In memory ...
0
votes
3answers
57 views

Use HttpUtility.HtmlEncode or create extension method

Should I use HttpUtility.HtmlEncode or write an extension method? Pro for using HttpUtility.HtmlEncode is that other developers can instantly see and recognise what it's doing. Pro for using an ...
0
votes
2answers
132 views

Is an empty class in some cases correct

I know it's generally a design flaw to have an empty class, yet I'm wondering whether there are some cases where it isn't to have an empty (abstract) class to group objects. Especially when ...
0
votes
1answer
139 views

How Common/Acceptable is it for a .NET developer to abstain from WebForms as a rule? [closed]

I work at a mostly .NET shop. A coworker has more of a background in open-source MVC (think RoR and Spring MVC). She seems to really enjoy .NET MVC, but she practically refuses to work on Web Forms, ...
5
votes
4answers
790 views

How important is an in-depth knowledge of the Common Language Runtime to a .NET developer?

I wonder how many .NET developers have a working knowledge of CIL and where it has been useful to them. In case you are missing my meaning, here is a simple CIL example to add two locations together: ...
2
votes
1answer
116 views

What are the important considerations when switching from monolithic to microservices architecture in .NET?

We are contemplating breaking up our monolithic monsters into microservices based architecture progressively. We have 5 teams, each team containing 2-3 C# developers, at least 1 database developer, ...
2
votes
1answer
102 views

Different ways of array declarations in C#

What is the difference between the following two methods of creating an array in C#: int[] arr = new int[] { 1, 2, 3 }; Array arr = new int[] { 1, 2, 3 };
-1
votes
1answer
125 views

Which file format should I use as an alternative to my current Excel worksheet? [closed]

My .NET application does its work and then creates a report (an Excel worksheet). That report contains thousands of short text strings [KEY - VALUE]. So Excel worksheets suites very well, one column ...
0
votes
0answers
13 views

.NET server object instance: Singleton vs Per Call vs Per Client in the context of a 2 tier architecture

Note: This is a theoretical question weighing up the pros and cons of server object instancing, the tier architecture is not the topic of the question. My question is simply whether my thoughts are ...
2
votes
0answers
181 views

Software License for project using .NET and Sql Server Express

I considering making my application open source on github. I don't intend to sell it (neither in binary form nor source code form). It probably isn't even useful to a lot of people except maybe for ...
7
votes
2answers
121 views

Is there a practical reason not to use a .NET “setting” to store data that is not a setting?

.NET applications developed using Visual Studio have an easy way to store and recover user settings. You can add the default value of a setting in a special class and have read/write access to it at ...
1
vote
1answer
35 views

Encapsulate common application libraries into a single library project

My company is planning to integrate 3 in-house libraries into all of our applications (with possibly more on the way), and I'm wondering what the best way to go about this would be. My initial ...
1
vote
1answer
76 views

Layer application and token authentication

Suppose we have an application with multiple layers in .Net: Domain layer (entities) Data access layer (entity framework) Business layer Web Services layer (Web Api) Presentation layer (MVC) Now I ...
3
votes
2answers
94 views

How should I refer to data bound columns?

I work often with data-bound applications with WinForms; records are pulled from a database and updated in a client application that I write. Stored procedures are used for all database transactions ...
8
votes
2answers
612 views

Who should initialize dependencies in a TDD application?

I'm trying to learn implementing TDD with mocking/fake objects. One of the questions I have is how to initialize a dependency in an application which implements TDD? An example from this article ...
6
votes
2answers
3k views

Examples of permission-based authorization systems in .NET? [closed]

I'm trying to figure out how to do roles/permissions in our application, and I am wondering if anyone knows of a good place to get a list of different permission-based authorization systems (...
19
votes
9answers
7k 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 ...
2
votes
1answer
74 views

What design pattern(.Net) to use for multiple control design with multiple properties?

I have to design for a bunch of user control types, each of which share some common properties but some of which have special unique properties. For example, the common properties across all the ...
2
votes
1answer
430 views

Thoughts on having a generic, reusable grid viewmodel

I'm developing a wpf-based application and I'm currently struggling to find the best way of supporting a recurring scenario in it. This app uses grids a lot. There are a bunch of features I want in ...
0
votes
2answers
92 views

Injecting a factory with multiple constructor parameters

Initially I needed only one queue to be created by the MessageQueueFactory: container.RegisterSingleton<IMessageQueueFactory>(() => { var uploadedWaybillsQueuePath = ConfigurationManager ...
0
votes
1answer
71 views

What's the point of having the build number in the .NET framework versions?

The .NET Framework CLR files are located in the following folders under C:\Windows\Microsoft.NET\Framework: v1.0.3705 v1.1.4322 v2.0.50727 v4.0.30319 (Yes, there's v3.0 and v3.5 as well, but they ...
1
vote
1answer
263 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 ...
5
votes
5answers
2k views

Why do projects opt to stay on an older version of the .NET Framework? [closed]

Why do projects opt to stay on an older framework version of the .NET Framework? For example, staying on .NET Framework version 3.5 which was released in 2007 instead of upgrading to the latest 4.5.1 ...
8
votes
2answers
738 views

Why aren't all method virtual or why doesn't have each class at least one interface?

This is more philosophical question, which address .NET platform, but maybe it is useful also for other languages. I'm doing lot of Unit Testing and especially when I'm using third-party components I ...
0
votes
0answers
47 views

Serializing .NET object into a JSON string produces unreadable output [migrated]

I'm trying to convert a .NET object into a JSON string, because I want to be able to read the content of this object in the client side. Here is my controller code: public ActionResult Index(...
2
votes
1answer
182 views

Why and when would you use a .NET framework data type?

I've seen an increasing trend of people submitting code to SO that includes the use of .NET Framework data types. I understand that the .NET Framework has its own data types (like Int16, Int32, ...
3
votes
5answers
136 views

Conditionally initializing a string list

I am writing a program that needs to be able to process data from a number of different sources. The sources output data in a variety of formats. So, depending on which source is being used, I need to ...
0
votes
1answer
56 views

Portable Class Library best practices

I am converting some .NET framework targeted projects over to Portable Class Libraries and looking for some best practices. Usually all of my projects use the same project name and assembly name, and ...
2
votes
4answers
907 views

3 tier architecture in .NET web applications

Nowadays most systems are designed as web apps. In the .NET world the famous three tier architecture is usually translated like this. Front End (Web Application) Middle Tier (custom DLLs using an ...
1
vote
1answer
42 views

How to map references in different VB.Net solutions

I just come to a small company. There are more than 500 solutions in different VS.Net versions and even VB 6.0 projects. They share several dll. Is there a way to map relation between each program? ...
-3
votes
2answers
176 views

Can a media decoder/player be implemented entirely in C#? [closed]

One of these days, when talking to a friend about different programming languages and their uses, I mentioned that video players (and media coding implementations) are always written in lower-level ...
5
votes
5answers
465 views

.NET: Are web-based applications inherently harder to build than client-server?

We currently have an ongoing discussion about which approach to move into - we want to replace multiple older environments with .NET applications, and two potential architectures are under discussion: ...
2
votes
2answers
138 views

C#/VB struct – how to avoid case with zero default values, which is considered invalid for given structure?

How to implement some constrained .NET struct/structure (let's say LimitedString), where its state with default values (set by CLR to technical defaults, i.e. nulls, zeros, etc.) should be prohibited ...
5
votes
3answers
130 views

Is it worth the effort to use culture invariant string formatting in single-culture applications?

Sometimes, we need to stuff an integer ID into a string, for example when generating HTML form <select> items. Calling int.ToString() can result in digits outside the range [0-9] in certain ...
1
vote
1answer
72 views

In a .NET Windows Forms app with a custom MVC, should a custom UserControl (view) implement any non-animating logic on its own?

This is strongly linked to these two questions: http://stackoverflow.com/q/15800945/279112 Should Controller know about View & Model? or vice versa? as well as this one: http://codereview....
6
votes
2answers
383 views

Is there any reason to use a Func over a method?

I recently just started looking at Func in C#, and as far as I can tell, they pretty much are the same as methods, which is fair enough. However, I was wondering if there is any point in using them, ...
1
vote
0answers
43 views

Better dynamic user permissions

I support an Internal ERP system and an external Reporting/Dashboard that our customers use that both use the same database. Internal normal application users can control what customers can access ...
13
votes
4answers
4k views

Am I wrong in thinking that needing something like AutoMapper is an indication of poor design?

Automapper is an "object-object mapper" for .Net, which means copying objects from a class into another class that represents the same thing. Why is this ever useful? Is the duplication of classes ...
2
votes
2answers
172 views

What is a good approach to get a detailed system design from an existing system?

I will be working on a system which will be ported over from Java to .Net. It is a pretty big system. I don't have any specifics about how the system is designed, no documentation, nothing. You know ...
0
votes
0answers
52 views

Looking for pros/cons on using OWIN vs. a simple hand-rolled token based auth

We are wanting to implement an API to be used internally and externally and add it to our solutions. Some environment notes: We are currently using VS2013, .Net 4.5, EF5, SQL2008, MVC4, C#, and asp....
2
votes
2answers
91 views

How to handle when only certain derived classes need to be disposed?

I am trying to build a framework of objects where the main actors can be interchanged freely. At the moment I've done this by creating an abstract base class that all of my actors can be derived from. ...
4
votes
1answer
119 views

When starting a new ASP.NET application, what changes when I change from .Net 4.5 to 4.6.1 and why is 4.5 the default?

Using Visual Studio 2015 update 2, creating a new ASP.NET 4.x application, the default .Net "Target framework version" is 4.5. Is it a mistake to bump this to 4.6? I did my own research, and I am ...
0
votes
0answers
55 views

Call any number of different web services at different time intervals

I am creating a program that needs to retrieve data at user-specified time intervals from different devices. An analog to what I am doing, is that I am performing requests to different web services. ...
0
votes
0answers
83 views

What to use in case of waiting for something that is complete: delegates, events and/or thread

I try to give a concrete example. Create a semaphore for a crossroads. I have two semaphores. I have possibility to set a duration of semaphore 2 minutes, 5 minutes, 10m inutes etc. When one ...
7
votes
2answers
420 views

When and why to use Nested Classes?

Using Object Oriented Programming we have the power to create a class inside a class (a nested class), but I have never created a nested class in my 4 years of coding experience. What are nested ...