Is string operator “+” so simple?

Is string operator “+” so simple?
Rate this post

Introduction

A string data type is one of the fundamental data types, along with numeric (int, long, double) and logical (Boolean) ones. You can hardly imagine at least one useful program that does not utilize this type.

On the .NET platform, the string type is presented as an immutable String class. In addition, it is strongly integrated into the CLR environment and is also supported by the C# compiler.

This article is devoted to concatenation – an operation performed on strings as often as the addition operation on numerals. You may think: “What is there to say?”, after all, we all know about string operator “+”, but as it turned out, it has its own quirks.

Read More

Under the Hood of Stopwatch

Under the Hood of Stopwatch
5 (100%) 1 vote

Introduction

As all developers, I often need to measure the execution time of my own (and not only my own) code. When I was a beginning programmer, I used the DateTime structure for this purpose. Time have passed and I learned about the Stopwatch class and began using it extensively. I think most of you had a similar experience. It’s not like I didn’t wonder about how Stopwatch works, at that time, it was simply enough for me to know that Stopwatch measures the elapsed time more precise than DateTime. Now the time has come to explain to myself as well as to the readers how the Stopwatch class actually works and clarify its pros and cons in comparison with DateTime.
Read More

CHECK Constraints in SQL Server

CHECK Constraints in SQL Server
4 (80%) 1 vote

In this article, we will talk about CHECK constraints. We will see how to add CHECK constraints to SQL Server table columns and discuss the pitfalls you may encounter when using this type of SQL Server constraints.

CHECK constraint basics

CHECK constraints are simply conditional statements (predicates that return TRUE or FALSE) that refer to table columns for maintaining data integrity. When one inserts data into a column or several columns in a single row, CHECK constraints come into action. They evaluate the data to be inserted. In case the data does not meet the condition specified in the CHECK constraint, the insertion fails.

Read More

Creating and Accessing In-Memory OLTP Databases and Tables

Creating and Accessing In-Memory OLTP Databases and Tables
3.5 (70%) 2 votes

This is the second article in a series of articles about SQL Server In-Memory OLTP.

The introductory article — SQL Server In-Memory OLTP, briefly introduced the basics of the new Hekaton engine. In this part, we will focus on practice. To be more specific, we will see how to create In-Memory optimized databases and tables, and also, how to assess them with help of T-SQL. Read More

Pivot Tables in MySQL

Pivot Tables in MySQL
4.3 (86.67%) 3 votes

  1. Briefly about Pivot tables
  2. Pivoting data by means of tools (dbForge Studio for MySQL)
  3. Pivoting data by means of SQL
  4. Automating data pivoting, creating query dynamically

Briefly about Pivot tables

This article deals with the transformation of table data from rows to columns. Such transformation is called pivoting tables. Often, the result of the pivot is a summary table in which statistical data are presented in the form suitable or required for a report. Read More

Handling a GDI Resource Leak

Handling a GDI Resource Leak
5 (100%) 2 votes

GDI leak (or, simply the usage of too many GDI objects) is one of the most common problems. It eventually causes rendering problems, errors, and/or performance problems. The article describes how we debug this problem.

In 2016, when most programs are executed in sandboxes wherefrom even the most incompetent developer cannot harm the system, I am amazed to face the problem I will speak about in this article. Frankly speaking, I hoped that this problem had gone forever together with Win32Api. Nevertheless, I faced it. Before that, I just heard horror stories about it from old more experienced developers. Read More

Effective Use of Classes in .NET

Effective Use of Classes in .NET
3.5 (70%) 6 votes

When you need to learn a programming language, you buy a book. From books, we learn basics of the language and how to program, but this is only the beginning – there is also a development environment, and the work with it is another complicated story. Let’s take a look at some secrets of Visual Studio and some secrets of classes. Read More

ASP.NET Core 1.0. Platform. Part 2. ASP.NET Today or what to choose?

ASP.NET Core 1.0. Platform. Part 2. ASP.NET Today or what to choose?
2 (40%) 1 vote

Many of us (including myself) have been waiting for the final version of .NET Core and ASP.NET Core. Now the wait is over – a couple of months ago the RTM version of the web app development technology named ASP.NET Core 1.0, has been released. Just a reminder: in early 2016 it was branded as ASP.NET 5. All new features of the new version of the Microsoft.NET platform have been described in general terms. In this article and subsequent articles, you will learn what else can be done with the latest .Net platform. I will also provide a broad description of the web development technologies that Microsoft offers today. To see what is available at the moment, we can just open Visual Studio 2015 Update 3 with the latest version of ASP.NET and Web Tools (VS2015Tools.Preview2.0.1).

Read More

ASP.NET Core 1.0. Part 1: Introduction, general description and the future of .NET Framework

ASP.NET Core 1.0. Part 1: Introduction, general description and the future of .NET Framework
4 (80%) 4 votes

The question is: “Microsoft ASP.NET vNext: evolution or revolution?“, the absolute answer is revolution. In this series of articles, I will try to describe in detail the latest technology for creating web applications, namely – ASP.NET vNext, which initially had the official name ASP.NET 5 and later was renamed to ASP.NET Core 1.0. There will be another series devoted to the development of a real application with examples describing the practical use of this technology.

Read More