C# (pronounced "see sharp") is a high level, statically typed, multi-paradigm programming language developed by Microsoft.

- Stackoverflow.com Wiki
55 articles, 18 books. Go to books ↓

Friends don't let friends use Office InterOp...

The .NET community is not widely controversial, though there is a strong topic that appears to come up time and time again when I pair with other developers - how to use var in C#.

A 2D/3D engine and framework that gives you a system for designing game or app scenes for 2D, 2.5D and 3D. Unity allows you to interact with them via not only code, but also visual components, and export them to every major mobile platform and a whole lot more - for free.

Ey You C# developer! Wanting to learn you some JavaScript? You’ve come to the right place! In this article you will learn how to map all those OOP C# concepts you have come to know and love to JavaScript, the ever growing language of the web!

How .NET treats loops involving array and collection access and what kinds of optimizations you can expect.

Most applications we build tend to have date and time data associated with it. If the application is not used just in a single location you are likely have to deal with times zones in your application. While .NET has a good set of date manipulation function, the various time zone conversion routines are a bit of a pain to use.

A .NET List is a list you can use as an array. Isn't it? Yeah, I'm sure it is. And I can use it anytime, can't I? Well, "No". And "No". Sometimes it's not a good idea at all.

Genetic Algorithms (GAs) are the nearest thing a software developer can get to magic. Watching a solution to a problem evolve, is awesome.

Though C# has many great features, a handful could have been designed differently or omitted entirely, says Eric Lippert, who should know, because he served on the design committee.

List of my favourite hidden features of C# language. Contain full explanation what they are doing accompanied with C# code examples.

There are a few questions which are deal breakers in case they are not answered correctly. These questions are quite simple, though fundamental. The candidates who cannot answer these questions, leave a bad impression.

C# (and any language that runs on the CLR) is a garbage-collected language, meaning that objects that have no references to them remaining will have their memory reclaimed at some point in the future. Creating too much garbage (by creating too many ephemeral objects or over-using the new keyword) can induce the garbage-collector too frequently, slowing down the entire application.

The ConcurrentDictionary provides the most efficient (and safest) way to shared named values between asynchronous processes with several powerful methods. But the best advice might be to avoid ever needing them.

The yield-keyword is often misunderstood. Its behavior can seem a bit strange at first sight. However, it’s often the key to creating efficient code that is maintainable at the same time. Its main use cases are custom and stateful iteration which allow you to create simple yet powerful code.

In this series, I’m going to be elucidating some common errors C# programmers make when working with multithreaded systems.

Deep Copy is not implemented in C#, there is only function Object.MemberwiseClone() on each object and it creates just a shallow copy. This article brings code of a very fast deep copy function implemented by Expression Trees.

What follows is a description of all the planned language features in C# 7.0. With the release of Visual Studio “15” Preview 4, most of these features are coming alive.

DateTime is a widely used .NET type. A lot of developers use it all the time, but not all of them really know how it works.

Using Roslyn you can access the inner workings of the compiler and use all its knowledge to create tools to boost your productivity or simplify your life.

A tuple is a data structure that provides an easy way to represent a single set of data. The System.Tuple class provides static methods to create tuple objects.

In general you have to know that Task.Run is more restricted version of Task.Factory.StartNew. Task.Run sets default which fit for most common cases. Task.Factory.StartNew is there for advance scenarios.

Most likely you’ve heard about The Law of Leaky Abstractions coined by Joel Spolsky. Even if you never heard of it, you definitely faced it in your day-to-day job. The “law” is pretty simple: “All non-trivial abstractions, to some degree, are leaky”. And this is 100% true. But sometimes even not that complicated abstractions can leak their internal details.

Applications use exception handling logic to explicitly handle the exceptions when they happen. Exceptions can occur for a wide variety of reasons. From the infamous NullReferenceException to a database query timeout.

Microsoft and the .NET community have made asynchronous programming very easy with their implementation of async await in C#. The latest versions of ASP.NET heavily utilize it to improve performance. Many performance monitoring and profiling tools struggle to support and visualize the performance of asynchronous C# code.

Let’s look at some different ways you could implement the strategy pattern in C#. First, I’d like to briefly mention why we care about design patterns and where the strategy pattern fits in.

[DebuggerTypeProxy] is very useful attribute when you have a class that inherits from another class and that one inherits from another one, and some of the classes contain collections of items and hundreds of properties that in fact are not important to you… Strictly speaking, when displaying class’ members while debugging makes you feel like quitting the job.

Hybridizer is a compiler from Altimesh that lets you program GPUs and other accelerators from C# code or .NET Assembly. Using decorated symbols to express parallelism, Hybridizer generates source code or binaries optimized for multicore CPUs and GPUs.

I’m going to show you four common mistakes C#/.NET developers make when dealing with time. And that’s not all. I’ll also show what you should do to avoid them and make your code safer and easier to reason about.

I think I spend more time debugging code than writing code, designing software architecture, trying to reproduce bugs and even going to meetings! Debugging is the biggest time consumer we have as developers.

The implemented network represents a simplified, most basic form of Neural Network. Nevertheless, this way one can see all the components and elements of one Artificial Neural Network and get more familiar with the concepts from previous articles.

After digging around in C#, I found some interesting discoveries. In today's post, I go over these uncommon C# statements/keywords with some examples.

Can database-style sharding improve the performance of a multi-threaded C# application? This tutorial talks about the performance bottlenecks in sophisticated C# concurrency operations and how sharding can solve these issues.

Roslyn is the codename-that-stuck for the open-source compiler for C# and Visual Basic.NET. Here’s how it started in the deepest darkness of last decade’s corporate Microsoft, and became an open source, cross-platform, public language engine for all things C# (and VB, which I’ll take as a given for the rest of this piece).

Anyone who worked on a big enterprise project knows memory leaks are like rats in a big hotel. You might not notice when there are few of them, but you always have to be on guard in case they overpopulate, break into the kitchen, and poop on everything.

Perl: "not exp log srand xor s qq qx xor s x x length uc ord and print chr ord for qw q join use sub tied qx xor eval xor print qq q q xor int eval lc q m cos and print chr ord for qw y abs ne open tied hex exp ref y m xor scalar srand print qq q q xor int eval lc qq y sqrt cos and print chr ord for qw x printf each return local x y or print qq s s and eval q s undef or oct xor time xor ref print chr int ord lc foreach qw y hex alarm chdir kill exec return y s gt sin sort split"

Concurrent collections are a feature added in .Net 4.0 and allow developers to create thread safe collections without worrying as much as they had to worry with Generic Collections.