Quantcast
Channel: Language Basics – Passion for Coding
Browsing all 8 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

this in JavaScript vs C#

Coming from C#/C++/Java, the usage of the this keyword in JavaScript is confusing. This is my attempt to explain it, in C# terms (with C# being very close to C++ and Java). I’ve thought of writing this...

View Article



Image may be NSFW.
Clik here to view.

More on this in JavaScript

There’s more to this in JavaScript than I showed last time. Time for more details on methods, closures and the global object. This is a direct continuation of the this in JavaScript vs C# post. If you...

View Article

Image may be NSFW.
Clik here to view.

Adding an Overload is a Breaking Change

Adding functionality to a library, without touching the existing code should be safe for clients, shouldn’t it? Unfortunately not, adding another overload to a library can be a breaking change. It...

View Article

Image may be NSFW.
Clik here to view.

.NET == and .Equals()

Equality might look like a simple concept at a first glance, but looking deeper it isn’t. In C# objects can be compared with the == operator, with the Equals(Object) member, with the...

View Article

Image may be NSFW.
Clik here to view.

A Code Coverage Puzzle

A simple comparison is marked as not completely covered, although both branches of the if statement have been covered!?! How is that possible? This is a small function I’ve created, which is also...

View Article


Image may be NSFW.
Clik here to view.

Code Coverage and Nullable

Comparisons of Nullable<T> types and code coverage can give some unexpected, but logical results. Earlier this week I posted a small Puzzle showing the problem. The light blue shade of the return...

View Article

Image may be NSFW.
Clik here to view.

Internal Classes and Members

What’s the use for the internal access modifier in C#? It’s not as common to use as public, protected or private. It wasn’t until I started some serious stand alone library work that I fully started to...

View Article

Image may be NSFW.
Clik here to view.

Expression Bodied vs. Auto Read-Only Properties

C#6 brought some nice short-hand ways of handling properties. I really like them, because they take away much boilerplate code. But as with all new tools, it’s easy to use them wrongly until they are...

View Article

Browsing all 8 articles
Browse latest View live




Latest Images