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

0
votes
0answers
54 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 ...
0
votes
2answers
200 views

General term for T[], T*, and T& [closed]

An array of T, a pointer to T, and a reference to T (represented as T[], T*, and T& respectively by Type.ToString) all share the similarity that they are constructed from an "element" type (which ...
3
votes
1answer
96 views

Distributing work between TCP Clients

I have an application (run by a Windows Service) which connects to a TCP server (let's call the service 'Listener' from here on). [It's important to note that the TCP server is out of my reach, and ...
0
votes
1answer
119 views

Why does ObservableCollection require all changes to be made on the UI thread?

And is there any danger to making my own INotifyCollectionChanged implementation that doesn't? I'm trying to make a class library contains a Log class, which in turns contains some sort of observable ...
2
votes
0answers
50 views

Designing a web based smart card publisher

I'm working on an application that's supposed to have a web based GUI where you can insert some data. That data will be saved in persistent storage and a hex number generated and stored alongside. ...
2
votes
2answers
80 views

can a single SQL Server connection be shared among tasks executed in parallel

Can a single SQL Server connection be shared among tasks executing in parallel? Each task would dequeue an item from a ParallelQueue, instantiate a SqlClient command, and insert a row into the table. ...
0
votes
0answers
197 views

use of minOccurs=“0” without nillable=“true” in SOAP

I have received an XSD from a 3rd party supplier generated from a Java based system; which is to be used to create a SOAP endpoint for us to receive data transfers. Their XSD does not make any use of ...
4
votes
2answers
228 views

Does such a design pattern exist? (Multi-Strategy/Multi-Traits)

Is there a design pattern that would allow a class from a hierarchy to 'subscribe to' concrete methods? For example, say you have an abstract base class that requires the implementation of a method. ...
0
votes
0answers
53 views

can a parallel queue empty itself?

Is there a way to accomplish this pseudo-code in C# in .NET4.5? parallelQueue.attemptDequeueFirstItem(item) success -> ( doAsyncTask(item).Success(UpdateDatabase) ) ...
0
votes
1answer
152 views

Neat way on passing interface parameter to a constructor

Having lots of Interface that needs to pass in a constructor looks messy, is there any neat way of doing it? Code snippet: public class Foo { private readonly IRepository1 _repository1; ...
-2
votes
1answer
179 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
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
33 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, [ ...
15
votes
6answers
763 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 ...
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 ...
1
vote
1answer
211 views

Can sequence alignment algorithms be used for search implementation?

Hi I want to implement a search on a website which includes imperfect search results. Meaning, if the search term is misspelled or slightly different from a 100% match, the function should still ...
0
votes
2answers
213 views

Create the fields in class level then instantiate inside methods or create and instantiated inside methods

I'm a newbie in software development. Just wondering which code is better and why should I continue which pattern I should follow. First Snippet: Class TestClass { private Object1 field = null; ...
2
votes
2answers
158 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: ...
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 ...
98
votes
8answers
79k views

How do you organize your projects? [closed]

Do you have any particular style of organizing projects? For example, currently I'm creating a project for a couple of schools here in Bolivia, this is how I organized it: TutoMentor (Solution) ...
-1
votes
2answers
164 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 ...
5
votes
4answers
3k views

Why does Microsoft still ship VBA within Office products, instead of integrating .NET directly? [closed]

I know that it's possible to call .NET code from your VBA code, but why does VBA continue to exist? The only reason I can think about is legacy. I just had to sort a Scripting.Dictionary and the ...
6
votes
4answers
1k 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 ...
1
vote
1answer
382 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 ...
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 ...
45
votes
16answers
15k views

Why use an OO approach instead of a giant “switch” statement?

I am working in a .Net, C# shop and I have a coworker that keeps insisting that we should use giant Switch statements in our code with lots of "Cases" rather than more object oriented approaches. His ...
-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 ...
1
vote
2answers
747 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 ...
34
votes
6answers
16k views

When to use weak references in .Net?

I have not personally come across a situation where I've needed to use WeakReference type in .Net, but the popular belief seems to be that it should be used in caches. Dr Jon Harrop gave a very good ...
23
votes
9answers
17k views

Why was Scala not implemented with C or C++

Does anybody know why was Scala implemented in Java and .NET instead of C or C++? Most languages are implemented with Cor C++ [i.e Erlang, Python, PHP, Ruby, Perl]. What are the advantages for Scala ...
11
votes
4answers
29k views

What are the differences among the .NET certification exams? [closed]

I am a .NET developer using WPF and ASP.NET MVC and I was hoping to pass some kind of certification exam. There seems to be four exams but I am unable to understand what the differences are even ...
12
votes
2answers
6k views

Should I swap from WCF to NserviceBus

We have a central server that sends and recieves messages from a number of PCs that are located on client networks in various locations. To facilitate this, currently I'm using WCF with ...
7
votes
3answers
2k views

How to share methods and properties between custom web controls

I'm building some custom web controls in .NET using C#. The controls inherit from the standard web controls, and add additional properties and functionality (e.g. I'm creating an 'extendedTextBox' ...
5
votes
4answers
3k views

Implementing a generic/dynamic custom property system in C#

I have an architecture design problem which I think is appropriate for this site. Note that I have made an EDIT to this post below, reflecting my latest potential solution to this problem. General ...
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 ...
21
votes
10answers
5k views

Declaring interface in the same file as the base class, is it a good practice?

To be interchangable and testable, normally services with logic needs to have interface, e.g. public class FooService: IFooService { ... } Design-wise, I agree with this, but one of the things ...
0
votes
3answers
399 views

Software design approach for large relational database

I am working on a personal side project that will utilize a complex and large relational database. During the design of the database I had some co-workers give advice to how I should approach my ...
31
votes
4answers
5k views

Why does F# have an interactive mode but not C#?

F# comes out of the box with an interactive REPL. C# has nothing of the sort and is in fact kinda difficult to play around without setting up a full project (though LINQpad works and its also possible ...
0
votes
4answers
383 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
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
1answer
116 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 ...
2
votes
2answers
786 views

Why is there no here document syntax in .Net? [closed]

Is it considered bad form? Maybe it promotes non-separate model / view? Is it inefficient? Was it just left out? I guess every language has features that certain developers wish were there, and not ...
0
votes
3answers
205 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
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: ...
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 ...
10
votes
3answers
2k views

Storing n-gram data

I was hoping to brainstorm a little bit on the subject of storing n-gram data. In my project, I am trying to solve linguistic problems where I know all (n-1) data items and want to statistically guess ...
3
votes
0answers
365 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 ...
50
votes
8answers
21k views

Return magic value, throw exception or return false on failure?

I sometimes end up having to write a method or property for a class library for which it is not exceptional to have no real answer, but a failure. Something cannot be determined, is not available, not ...
37
votes
3answers
25k views

Best practices for logging and tracing in .NET

I've been reading a lot about tracing and logging, trying to find some golden rule for best practices in the matter, but there isn't any. People say that good programmers produce good tracing, but put ...