C# Interpolated Strings

I was recently working on a project where i had to write queries to fetch data from Sql Server. The worst nightmare is when tables names are dynamic that is table names are based on certain parameters.The trick to querying the particular table on the basis of parameter passed is using string.Format() . It can be used to create the query and passing table name as parameter but this becomes cubersome and error prone because you have to keep track of the placeholders like {0},{1} etc

C# 6.0 string interpolation elegantly solves this problem and this probably my loved feature of C# 6. So instead of writing things like

var query = string.Format("Select * from example_table_{0}",parameterName);

we could easily write it using string interpolation as

var query = $"select * from example_table_{parameterName}";

These placeholders in C# 6.0 are known as holes. It doesn’t stop here we can even pass optional alignment and format specifiers as we would in case of string.Format(). Also the contents of holes can include expressions as well as other strings e.g

var query = $"select * from example_table_{(parameter!=null?parameter:"default")}";

Keep an eye the “default” is a string inside of the expression

Trix A rich text editor for everyday writing

A Rich Text Editor for Everyday Writing

Compose beautifully formatted text in your web application. Trix is a WYSIWYG editor for writing messages, comments, articles, and lists—the simple documents most web apps are made of. It features a sophisticated document model, support for embedded attachments, and outputs terse and consistent HTML.

React Desktop – React UI Components for OS X El Capitan and Windows 10

React Desktop is a library build on top of Facebook’s React library which aims to bring a native desktop experience to the web, featuring many OS X El Capitan and Windows 10 components. react-desktop works perfectly with node-webkit and Electron.js, but can be used in any JavaScript powered project!.