ABOUT MOHIT S
CAREER TIMELINE
- Sep`21 - Present
ACCENTURE
head of technology
🇲🇾 Kuala Lumpur, malaysia
Currently Working since One Year 10 months - May`20 - Jun`21
IRIS CORPORATION BERHAD
senior engineer
🇲🇾 Kuala Lumpur, malaysia
Worked for One Year One month - Jul`19 - Feb`20
KERRY LOGISTICS (KLN SERVICES SDN BHD)
senior software engineer
🇲🇾 penang, malaysia
Worked for 7 months - Apr`12 - Apr`19
CUSTOMMEDIA SDN. BHD.
system technologist
🇲🇾 kuala lumpur, malaysia
Worked for 7 years - Jan`11 - Mar`12
VNS PVT LTD
web developer
🇮🇳 new delhi, india
Worked for One Year 2 months - Mar`08 - Dec`10
GEOMAPTECH PVT LTD
software engineer
🇮🇳 gwalior, madhya pradesh, india
Worked for 2 years 9 months - Oct`06 - Feb`08
APARK SOFTWARE PVT LTD
software engineer
🇮🇳 gwalior, madhya pradesh, india
Worked for One Year 4 months
MOHIT'S SKILLS
STACKOVERFLOW
gold badges
silver badges
bronze badges
What's does the dollar sign ($"string") do?
is a concept that languages like Perl have had for quite a while, and now we’ll get this ability in C# as well. In String Interpolation, we simply prefix the string with a $ (much like we use the @ for verbatim strings). Then, we simply surround the expressions we want to interpolate with curly braces (i.e. { and }):
It looks a lot like the String.Format() placeholders, but instead of an index, it is the expression itself inside the curly braces. In fact, it shouldn’t be a surprise that it looks like String.Format() because that’s really all it is – syntactical sugar that the compiler treats like String.Format() behind the scenes.
A great part is, the compiler now maintains the placeholders for you so you don’t have to worry about indexing the right argument because you simply place it right there in the string.
C# string interpolation is a method of concatenating,formatting and manipulating strings. This feature was introduced in C# 6.0. Using string interpolation, we can use objects and expressions as a part of the string interpolation operation.
Syntax of string interpolation starts with a ‘$’ symbol and expressions are defined within a bracket {} using the following syntax.
{<interpolatedExpression>[,<alignment>][:<formatString>]}
Where:
- interpolatedExpression - The expression that produces a result to be formatted
- alignment - The constant expression whose value defines the minimum number of characters in the string representation of the result of the interpolated expression. If positive, the string representation is right-aligned; if negative, it's left-aligned.
- formatString - A format string that is supported by the type of the expression result.
The following code example concatenates a string where an object, author as a part of the string interpolation.
string author = "Mohit";
string hello = $"Hello {author} !";
Console.WriteLine(hello); // Hello Mohit !
Read more on C#/.NET Little Wonders: String Interpolation in C# 6