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
1answer
183 views

Why are interfaces necessary in MVP design pattern?

I am trying to understands MVP using Winforms. I found this example. Why do UserModel and UserView need to implement the IUserModel and IUserView interfaces ?
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
0answers
114 views

Are assemblies packed into another sort of file(e.g Portable Executable) before JIT starts converting CIL into native code?

I've read that assembly is the smallest unit of functionality and that CIL code is stored in assembly along with assembly metadata.If this is true, here's my question: Are assemblies packed into ...
0
votes
0answers
34 views

Collection for time-series data in .Net

I am communicating with a device that returns logged data in roughly this format: { timestamp of first data set, [ device1value, device2value, device3value] }, { timestamp of second data set, [ ...
8
votes
2answers
157 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 ...
2
votes
2answers
163 views

C# / VB.NET build expression trees only from lambda expressions — why?

Based on the context, C# can generate the expression tree for a LambdaExpression from lambda expression syntax: Expression<Func<string, int>> expr1 = s => s.Length; as can VB.NET: ...
15
votes
6answers
764 views

Methods of debugging code (Nightmare situation)

I am frequently tasked with debugging an application at my job. It is a BI Application that we deploy to businesses, which includes a test environment, and a production environment. I am wondering if ...
-1
votes
2answers
168 views

Creating an ASP.Net MVC web application that can work on different operating systems

I have been developing and deploying many ASP.Net MVC web applications under Windows Server 2008 R2 & Windows Server 2012 R2, and I used IIS 7 & IIS 8. At the same time I know that I can ...
4
votes
2answers
69 views

Branching and Merging Business Data

We're working on a project wherein the business users operate on a set of data that is periodically published. We've labeled the publishing milestones as Versions, and, due to some business ...
1
vote
1answer
404 views

How do constructor parameters of a MVC Controller get set?

How does the construction injection work? I have the following code: public class AdvancedSearchController : Controller { private EmployeeController _employeeController; public ...
-1
votes
1answer
83 views

.net Windows app in a web page [closed]

I am developing a feature related to Microsoft Outlook which has support only for Windows library. However, I have to put this into a web page for the users. In the process of consuming the windows ...
-2
votes
1answer
45 views

Convention for exception argument order [closed]

Just a quick question about a design pattern for creating custom exceptions. The question is more about the order of parameters. If you can specify more data in the exception, should the parameter for ...
3
votes
1answer
126 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 ...
6
votes
3answers
157 views

Overriding Equals in an unbrittle way

I have a class WorkflowItemSearchCriteria whose instances represent a set of values and references that will be used to return a filtered result set of workflow items based on the given search ...
5
votes
4answers
283 views

Object with Customized Properties and Methods

A project I am working on currently models Order information. Right now, there is one class with a bunch of properties and functions that all of orders have in common. In addition, some of our users ...
0
votes
1answer
49 views

Include exceptions in activity diagrams? [closed]

Should I include exceptions, like a TimeOutException or just general Exceptions, to a activity diagram? For example: A activity diagram describing a client-server connection. Several exceptions can ...
0
votes
4answers
386 views

In C#, what is the benefit of assigning a class variable to an interface variable before calling any methods?

Where I work we develop in C# .NET and I was looking a code that they have made (my job is to optimize it) but I saw something in particular: Assuming that InterfaceDHO is an interface and ClassDHO ...
0
votes
1answer
117 views

Why does the Windows Clipboard require an STA thread?

To copy something to the clipboard in Windows (at least in .NET as far as I know) it has to be done on a separate thread that is in STA Mode. One example I have used is this. Thread thread = new ...
1
vote
1answer
46 views

Why does XmlWriter.Create have output parameters?

Why does XmlWriter's create methods have output parameters? For example (from MSDN) public static XmlWriter Create( StringBuilder output, XmlWriterSettings settings ) output Type: ...
0
votes
3answers
206 views

What really is the “runtime environment”?

This is a very basic question but is something I've never completely understood and recently, when studying .NET Core and ASP.NET 5 I felt the need of a more complete understanding of the topic. ...
1
vote
2answers
63 views

How to design a meta model for configuration? [closed]

In our software we have a client/server architecture where the server is actually running on an embedded system with various hardware components (sensors, etc.). The different sensors as well as other ...
3
votes
0answers
366 views

Writing a Compiler - .reloc section of the COFF

I'm looking for a little bit of direction in writing a compiler. I've written in Common Intermediate Language, C#, and various other .NET languages; I've written my own Metadata Parser and now I'm ...
1
vote
1answer
70 views

windows users vs. custom [closed]

My application needs to support a "shift change" scenario. Essentially, a person is managing some assets. At the shift change, the person that was there leaves right as the replacement signs in. The ...
4
votes
2answers
111 views

Does one need to mock concrete data objects?

I've been working on a large project where much of the code is not under test. I have been able to add some unit tests to functional areas of the code, and also to start mocking services but I have a ...
1
vote
3answers
208 views

I have one app on one server - is there a critical reason to use a web server like IIS or NGINX? [closed]

Considering the following For a stack: ASP.NET/MVC5 WebApi with Single Page Application (SPA). This typically must run in IIS or hosting container (OWIN). I want to deploy multiple web application ...
2
votes
1answer
104 views

Use of project-specific values with enum defined in class library

We have an enum in a class library: Public Enum FieldType Phone Span Gender DrawPath .... End Enum which we use with an attribute applied to properties, for multiple scenarios: ...
1
vote
2answers
202 views

The granularity level to repeat code: should downloading, unzipping etc. be handled by separate classes?

I make extensive use of DI, but I wonder, where is the 'granurality' limit, when some set of functionality should be separated to a class - lets take an example: public class DownloadManager : ...
3
votes
1answer
230 views

Can I fully automate Docker deployment of a .Net CoreCLR on a CI Server without installing Visual Studio?

I'm experimenting with the deployment of ASP.Net 5 CoreCLR apps to Linux Docker containers. Literally all the articles, posts, etc. I found involve using the Visual Studio GUI. On publish a PowerShell ...
1
vote
1answer
152 views

How to improve performance for serializing and deserializing a large object graph?

I have a large object graph in .NET (F# as it happens) that I need to persist to disk and then will load again periodically for use in a calculation. The performance of deserializing is more ...
0
votes
2answers
125 views

IoC container with lifetime attribute [closed]

Which ioc frameworks for .net can use concrete type attribute to choose it's lifetime? Here is a simple example public interface IService {} [Singleton] public class ServiceImplA : IService {} ...
1
vote
2answers
75 views

Working with local connections instead of global

In recent weeks I became very concerned that the way I've been working with database connections for the past years, is simply wrong. I exclusively create a new connection for each database operation ...
3
votes
3answers
117 views

Split a File into Multiple Objects Functionally

I want to read a file into a collection of objects. The data (it's a Leica PTX file if you're curious) is formatted as follows: 640 [begin item #1: number of columns] 480 [number of rows] 0 0 0 ...
3
votes
3answers
186 views

Which scenarios to use .NET Concurrent Collections effectively?

I am investigating how to introduce parallelism into an application to improve performance. In particular, I am looking at parallel for loops and their variants and my initial experiments show ...
5
votes
3answers
351 views

Entity Framework in n-tier application confusion

I'm building a rather large (web) application where I'm using Entity Framework to communicate with the database. My solution is set up in layers like so: Client Website (MVC web application) ...
8
votes
4answers
2k views

Will the Database connection be closed if we yield the datareader row and not read all the records?

While understanding how yield keyword works, I came across link1 and link2 on StackOverflow which advocates the use of yield return while iterating over the DataReader and it suits my need as well. ...
1
vote
1answer
167 views

Is there an reason to call the base constructor of object?

I wonder if there is any reason to call the base constructor when inheriting from object. class Foo { public Foo() : base() // calling the Object constructor { // Foo ...
2
votes
1answer
203 views

What is the best way to horizontally scale .Net back-end applications?

Given a workload with many long running CPU/IO intensive operations (e.g. producing multi-GB text files from database reads and business rules), what is the best way to balance .net application load ...
1
vote
2answers
749 views

C# .NET MVVM software architecture and naming conventions

I am currently working on a software using C# .NET and WPF with the MVVM pattern. Though the software is almost done, I have been discussing our architecture for a long time and I would like to get ...
4
votes
1answer
872 views

Why is there not a basic SortedList<T>?

As far as I know, there is no way to get a List<T> with the capacity to sort itself. If I add a element, I want the data-structure to insert it in the right position (based on the associated ...
2
votes
2answers
293 views

Using a private auto-implemented property vs. a private field

If I have a need for simple, private fields, is there any reason I shouldn't just make it a convention to use private, auto-implemented properties instead? For instance, I could do this: private ...
7
votes
1answer
320 views

Never using Models, only ViewModels

I'm starting a new MVC 5 project from scratch. I'm using EF 6 (Database First) and Identity 2.0. My solution consists of 3 different projects: Data (where I have a .edmx and my DB context), Resources ...
2
votes
3answers
92 views

Best practise for databinding when a non-data object is included with the data

I'm using .NET with Windows Forms, but I believe there may be similar concerns with other toolkits. Suppose we have a list of objects of a certain type. Using an example to make the following easier ...
3
votes
1answer
237 views

Distributed long-running jobs

Scenario Various types of files containing customer's data are being uploaded via FTP, and a POST is being made to a REST API to update a database table, which tells the system (a web app) which of ...
3
votes
1answer
379 views

Onion architecture in client-server application

I'm staring new project, cross-platform. I want to use onion architecture there. It will be a simple game (tic tac toe), just for education purposes. This app will be client-server type. Now, I read ...
0
votes
0answers
32 views

TreeView items with attached 'quick action' buttons

I’m building a visual hierarchy of objects based on the TreeView control. Each level within that hierarchy corresponds to a different kind of object, and as such it’ll be implemented as a separate ...
0
votes
1answer
100 views

Working with external translators in .NET

I am working on a .NET project (happens to be an MVC website) that is being deployed in 5 languages. We have several hundred text strings in various .resx files, which is working great. However, the ...
1
vote
0answers
351 views

Architecture for C# Chat Application - not sure if WCF is right

I had written a WCF based "chat/notification" system but I am questioning my decision if WCF is a good fit. I have an external 3rd party lib that calls my process when events arrive: public class ...
2
votes
1answer
140 views

Inclusive or exclusive upper bound in pseudo-random number generators

I am creating a little randomization library. One of the methods is similar to .NET's System.Random.Next(int start, int end). The thing is, I am not sure how to decide on whether the upperp bound ...
4
votes
1answer
168 views

Azure ServiceBus Queue: Consumer Application

I am running a .net MVC4 web application. I want to be able to hit an action on a controller, create an email and send it to my service bus queue to be processed (sent). What are my options as far ...
0
votes
1answer
82 views

Combining Fitnesse, .NET and RESTful APIs

I know there is Fitsharp for combining Fitnesse and .NET. And there is RestFixture to combine Fitnesse and REST. Is there a way to test a RESTful service with Fitnesse under .NET? If not, is there ...