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
4answers
2k views

Microsoft's coding standards for ASP.NET controls

I cannot find any naming standards/conventions in MSDN for naming ASP.NET controls. One of the following standards tends to be used by programmers: lblAddress AddressLabel Address According to ...
1
vote
1answer
135 views

Does Silverlight5 provide anything new for WCF

From WCF standpoint, just wondering whether I can leverage anything after upgrade from Silverlight 4 to Silverlight 5? I did some research regarding new features of SL5 and cannot find anything about ...
1
vote
2answers
454 views

How to manage my private key for signing .NET assemblies?

I write open source .NET class libraries as a hobby and thought about signing them. I can get Visual Studio to generate me a password protected public/private key pair and save it as a .pfx file, but ...
0
votes
1answer
192 views

Streamlining ASP.Net MVC deployment? [closed]

I own a VPS with Windows Server 2012 on it. I can install whatever I want on it. In the past when deploying an ASP.Net MVC project, I would right click the project in the solution and Publish it. I ...
0
votes
2answers
3k views

WCF Keep Alive: Whether to disable keepAliveEnabled

I have a WCF web service hosted in a load balanced environment. I do not need any WCF session related functionality in the service. QUESTION What are the scenarios in which performances will be ...
1
vote
2answers
233 views

Client Server .NET application with queuing message

I am new, so forgive me if my question is mistaken or anything, just give me an alert and I'll be glad to fix it. Me and my team is about to develop a system where the database is located in a ...
1
vote
2answers
1k views

3 Tier Application Architecture, logic and database

(Note: The examples are simplified) I've seperated my solution into 3 projects WebSite Business Logic Data Access Logic The Website has access to BL and DAL The BL has access to nothing The DAL ...
0
votes
1answer
1k views

I/O interface for portable library

I'm writing a new .NET portable library that can read a file format, and file I/O is not available for portable libraries. The article "How to Make Portable Class Libraries Work for You" states that ...
5
votes
2answers
318 views

How to implement two different web services running the same business logic?

We are developing a ReSTful HTTP API with Servicestack(.NET). Some of the API clients, which have a subset of the actions, demand a service which could be easily added with all the entities, like ...
5
votes
2answers
304 views

Which design pattern is illustrated by inheriting IStructuralComparable interface?

We know that some design patterns are found so useful that they become features of the language itself. For instance, the interface IEnumerator which is implemented by Array object. This helps in ...
16
votes
3answers
1k views

How many are too many nested function calls?

Quoted from MSDN about StackOverflowException: The exception that is thrown when the execution stack overflows because it contains too many nested method calls. Too many is pretty vague here. ...
10
votes
2answers
553 views

.Net developer trying to learn ruby on rails

I am a .NET developer and I just had the chance to play with Ruby on Rails this weekend. In .NET we separate layers of the application by creating separate class library projects. From the design ...
-3
votes
1answer
228 views

Reinventing the wheel, or the technology that drives it? [closed]

I recently asked a question on StackOverflow that was related to string splitting and pattern matching in .NET. Some beady eyed developers that viewed the question said: "It looks like you're trying ...
4
votes
1answer
698 views

Knowledge Transfer and software development [duplicate]

I have been working on an application alone for several years. I am now asked to transfer knowledge to a few other developers, which I think is a good idea because it will allow us to share the ...
-2
votes
3answers
134 views

With libraries available, should programmers also learn the old way of writting the same things? [duplicate]

With pre written programs available, needing just editing, should programmers also learn writing them from scratch?
7
votes
3answers
298 views

Is it safe to assume that one controller will only ever use one primary model?

So, I'm designing an MVC framework. In the name of keeping everything statically typed and non-magical, I've come to quite a problem with "automatically" passing models to a controller. So, ...
1
vote
1answer
111 views

Storage Client Library 2.0 - Why is the API not as intuitive to use as 1.7?

I am migrating to using the new Storage Client Library for my Azure Table Storage. Querying with the previous Storage Client Library 1.7 namespace: var orders = serviceContext ...
9
votes
3answers
1k views

Is there a proper way to create a file format?

I'm building a proprietary file format for an application I wrote in C# .NET to store save information and perhaps down the line project assets. Is there a standard on how to do this in any way? I was ...
7
votes
3answers
3k views

BackgroundWorker vs. Async/Await

I am new to C# development and wish to create a more responsive UI. In my preliminary research, I have seen two methods for achieving this: Multi-threading in conjunction with the BackgroundWorker ...
0
votes
6answers
339 views

Does it make sense and is it to acceptable to say “.NET code”? [closed]

There is C# code, VB.NET code... Can I also say ".NET code" as an umbrella term that covers all the languages you can use with the .NET framework? I've seen people using it as well as people saying ...
3
votes
2answers
513 views

what to make of a Microsoft Most-Valued-Professional who believes that .NET types are either primitive or complex? [closed]

I thought that in .NET types are either value types or reference types. But this guy, when asked about .NET types, talked about "primitive types" and "complex types". I understand that people ...
7
votes
2answers
366 views

Why do we need the async keyword?

I just started playing around with async/await in .Net 4.5. One thing I'm initially curious about, why is the async keyword necessary? The explanation I read was that it is a marker so the compiler ...
3
votes
1answer
620 views

The array class in C# - Implementation questions

I am studying the Array class in C#. The following is the implementation of System.Array class: [SerializableAttribute] [ComVisibleAttribute(true)] public abstract class Array : ICloneable, IList, ...
34
votes
1answer
2k views

Why does the .Net world seem to embrace magic strings instead of staticly typed alternatives?

So, I work in .Net. I make open source projects in .Net. One of my biggest problems with it isn't necessariyl with .Net, but with the community and frameworks around it. It seems everywhere that ...
2
votes
2answers
296 views

Elemental access in arrays

I was reading up on data structures from Code Complete. This is when I stumbled through this piece about arrays: Think of arrays as sequential structures Some of the brightest people in computer ...
5
votes
4answers
532 views

Why do code generators always use fully-qualified identifiers?

When you look at the code for the Winforms Designer, you see things like this: this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", ... etc. instead of using System.Drawing; ...
-1
votes
1answer
135 views

Good library for combining .net stack traces [closed]

I currently report my production exceptions to a mysql database, where they have been collecting dust for the most part. The problem I faced is grouping the stack traces. I would like to be able to ...
2
votes
1answer
304 views

How can I break my vendor lock-in situation?

I'm developing software for about 10 years. I began on QBasic and now I'm developing .NET using C# language. I'm always trying to follow the best design patterns and principals like SOLID. In short ...
5
votes
2answers
230 views

How to setup TDD environment

In TDD, is it good practice to keep the tests in the same directory as the code its testing or is it better separate the tests in either a different directory or a separate project. Would it be the ...
16
votes
4answers
6k 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 ...
6
votes
3answers
425 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 ...
2
votes
6answers
658 views

Randomly select from list with increased odds

I have a list of entities. Every entity contains a number that holds how many times the entity has been selected. I need to make a function that selects n (say 25%) of the entities, randomly. What I ...
11
votes
3answers
539 views

Is using unit tests to tell a story a good idea?

So, I have an authentication module I wrote some time ago. Now I'm seeing the errors of my way and writing unit tests for it. While writing unit tests, I have a hard time coming up with good names and ...
64
votes
13answers
6k views

My boss has a bad case of “Not Invented Here”

My department specializes in converting customer data into our database schema so that they can use our software. Right now, we have C# applications that take an IDataReader (99% of the time it is a ...
8
votes
1answer
1k views

Is there an advantage to using WCF or WebAPI for mobile?

I'm looking at doing my first mobile development using Mono Touch and Mono for Android. I'd like them to communicate with an ASP.NET MVC 4 site I'm designing. I've worked with WCF and WebAPI in the ...
10
votes
2answers
3k views

async+await == sync?

Stumbled upon this post that talks about making async web requests. Now simplicity aside, if in real world, all you do is make an async request and wait for it in the very next line, isn't that the ...
5
votes
3answers
438 views

How much to test in TDD?

I am newbie to TDD (writing first project following TDD practices). I have fairly basic interface IProfiler and an implementation Profiler. interface IProfiler { bool IsBusy {get;} long Elapsed ...
1
vote
1answer
621 views

project layout using webapi

I have the following project structure I would like to implement. I would like to know if there are any pitfalls to structuring my code this way. It is going to be using Microsoft's WebAPI, an MVC 4 ...
1
vote
1answer
255 views

Effective implementation of “array” of type Int X String -> String in .NET or in general

The question in general is: is there a more effective way of implementation of table with structure like Dictionary<int, Dictionary<string, string>>? The reason I am asking this is ...
2
votes
2answers
461 views

Data representation with C# and WPF

I'm developing an application handling DB parts. I retrieve the data from the DB with stored procedures and prepared statements. Now I want to display the data in the GUI. What is the current ...
2
votes
1answer
119 views

WCF hardware requirement

I read the hardware requirements of WCF in a book and two of them are the following ones: A DVD-ROM drive A 1024 × 768 or higher resolution display with 256 colors or more Why is there a ...
9
votes
4answers
2k views

Alternatives to the repository pattern for encapsulating ORM logic?

I've just had to switch out an ORM and it was a relatively daunting task, because the query logic was leaking everywhere. If i'd ever had to develop a new application, my personal preference would be ...
17
votes
5answers
3k views

Why can't Windows services have a GUI?

I was using this feature in earlier Windows release like XP and NT. I was able to run a GUI from a Windows service. But it is not possible in the later versions. What is the reason behind the removal ...
7
votes
4answers
325 views

Storing Dynamic SQL in text files vs inline code

Our Architecture team is proposing a framework that would see our SQL queries moved from coded strings within our applications, into a file based system where we would invoke them with function calls. ...
3
votes
1answer
555 views

Where to put custom validation while using Entity Framework

I am using MVC3 and Enitty Framework 4 with the Database first approach. It created the context template with its own validation for the fields based on the database. My question is where should I put ...
1
vote
1answer
314 views

.Net search engine architecture and technology choice

I am in the process of designing a search engine for an asp.net site. The site currently uses Microsoft Indexing Server to index and search content which range from simple text files to MS documents ...
1
vote
2answers
397 views

Interaction of a GUI-based App and Windows Service

I am working on personal project that will be designed to help manage my media library, specifically recordings created by Windows Media Center. So I am going to have the following parts to this ...
4
votes
1answer
146 views

Using NSpec at various architectural layers

Having read the quick start at nspec.org, I realized that NSpec might be a useful tool in a scenario which was becoming a bit cumbersome with NUnit alone. I'm adding an OAuth (or, DotNetOpenAuth) to ...
0
votes
4answers
924 views

Obtain reference to Parent object during instantiation

I have a situation where a custom class is a property of another class. What i need to be able to do, if it is possible at all, is obtain a reverse to the "parent" class (ie the the class that holds ...
8
votes
5answers
615 views

Which is more maintainable — boolean assignment via if/else or boolean expression?

Which would be considered more maintainable? if (a == b) c = true; else c = false; or c = (a == b); I've tried looking in Code Complete, but can't find an answer. I think the first is more ...