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

-1
votes
0answers
5 views

HTML agile package c# [on hold]

I need to create a console application in Visual Basic With C# language but it requires HAP. The purpose of this console app is to download files from a website automatically Thanks
6
votes
2answers
477 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 ...
-1
votes
0answers
27 views

Text script to .net code [on hold]

I have a set of text files which contain the keywords. I need to generate C# code / C# classes by reading these files using C#. Each text file is meant for a class. The keywords map to methods in the ...
2
votes
1answer
157 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
122 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
64 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 ...
0
votes
1answer
54 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 ...
4
votes
3answers
2k 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 ...
2
votes
4answers
874 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
37 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
160 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
405 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
131 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
64 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: ...
6
votes
2answers
359 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
37 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 ...
2
votes
1answer
411 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 ...
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 ...
1
vote
1answer
255 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 ...
2
votes
2answers
171 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
43 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 ...
2
votes
2answers
89 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
114 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
1answer
52 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
78 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
406 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 ...
0
votes
3answers
151 views

What is the best way to update boolean variable in this particular scenario? [closed]

I have the following class and a method named ValidateEverything(), where IsEverythingValid becomes true only when a or b or both of them are true. I was wondering about what would be the best way to ...
0
votes
1answer
56 views

What would be the best technique for website localization in MVC?

Currently I'm working on a big website that will be published on almost 40 domains with different languages. My question is what would be the best way of doing localization/internationalization. I'm ...
2
votes
4answers
2k views

invoking methods within a conditional expression

In an oft-cited (if dated) reference for C# coding standards (pdf; from Lance Hunt), the statement is made, 33. Avoid invoking methods within a conditional expression. I've not seen this ...
0
votes
0answers
31 views

In Actor Pattern (AKKA.Net) Should actors be classes OR Objects?

Im Just getting started with actor pattern. Coming from UnitOfWork pattern. Lets say i want to create Actor Pattern for a Employee Management System to mark they are present or absent. The Problem Im ...
2
votes
1answer
30 views

What's a good strategy to go about registering 2-step hotkeys?

User32.dll exposes a RegisterHotKey function, to register, well, hotkeys: [DllImport("user32.dll", SetLastError = true)] [return: MarshalAs(UnmanagedType.Bool)] public static extern bool ...
4
votes
1answer
45 views

Logging multiple objects for various reasons, then grouping by that reason

I'm having trouble cleaning up my code, and was wondering if there was any sort of pattern that I'm not aware of that can help me in this situation. I need to process a list of objects in various ...
4
votes
2answers
352 views

How do I get people to contribute ideas for my .NET library?

I maintain a LGPL library for rapid development of large scale .NET applications, It's a general purpose class library containing functionalities that are used at the DAL and BLL level. So, in ...
1
vote
2answers
232 views

Need help with deciding elements for icon creating application

I'm trying to practice programing by creating a simple application which, I think, I can manage to do in .Net C# in Visual Studio 2010. I'm working on simple application which will let me to create ...
5
votes
3answers
137 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 ...
0
votes
0answers
47 views

Centralized management of app.config parts for self-hosted .NET services

What will be the best way to handle these scenarios, if they are not one-time, but regular: Self-hosted services on quite a bunch of machines are needed to be reconfigured to a different database in ...
0
votes
1answer
135 views

What's the most straightforward way to integrate my company's custom authentication with ASP.NET SSO?

My company has a series of WinForms applications that pretty crudely provides authentication by checking usernames and passwords directly against the database (with a little hashing). I have a fair ...
1
vote
2answers
117 views

Working with multiple environments and vNext best practice

The new ASP.NET documentation under Fundamentals/Working with Multiple Environments it has a detailed description of how to handle multiple environments (surprise surprise) in code. I was wondering ...
1
vote
1answer
88 views

.NET Implementation Question (repository access)

I am trying to write a generic method which goes a particular DB table depending on the entity which is passed (all valid entities implement IStaticData) : IEnumerable<T> ...
5
votes
5answers
520 views

How to handle exceptions that get absorbed by a 3rd party library?

I'm currently having an issue with a 3rd party control library provider. They have an exception occulting culture that gets in the way of my general fail-fast approach when developing software. An ...
0
votes
0answers
136 views

Winform User Control on ASP?

I wrote a C# Winform User Control as follows when Executable is Run: My question is how we can use this Winform C# user control in one ASP Page. I know about WEB User Control and using in ASP but ...
5
votes
1answer
144 views

Reasons not to have flexible role management system

Our .NET web application has the ability to add roles dynamically and assign functionalities (we define them in an application enum) to that role. So those functionalities are defined by us (our ...
6
votes
3answers
2k views

Is the Entity Framework appropriate when all you do is insert records in bulk?

My department develops software to migrate databases for our customers from their old CRM software to ours. In this process we could be inserting up do millions of rows, processed one at a time as we ...
2
votes
3answers
158 views

Writing new code in async but calling sync

I am writing some new code and would like to write it using async and await, but the calling code does not currently support async. Is it right to write the new code in async and call it sync until ...
2
votes
2answers
331 views

SQL query or C# .net code for csv files import?

My aim here is to find out the best possible and feasible solution for my dilemma. I want to import some csv file (may contain around 50~60K records) into database after some manipulation into the ...
3
votes
1answer
127 views

Activity Feed Object to Notify Users

We're developing a transactional application in .NET (ASP.NET MVC, C#, Workflow Foundation, EntityFramework), and want to implement a system whereby users are notified of work that needs to be done ...
2
votes
1answer
77 views

Would the APM be faster or more efficient than TAP?

I'm doing some research for a project in which I will need to create a service which can handle millions of requests per minute. Clearly I want to use an asynchronous programming model to make the ...
0
votes
2answers
251 views

Trust .net compiler after Microsoft updates

Microsoft releases upgrades and changes to .net, msbuild and Visual Studio quite frequently. How can I be sure the MSIL code created by msbuild or the Roslyn compiler in VS 2015 will be the same or ...