Tigraine

Daniel Hoelbling-Inzko talks about programming

I'm so stupid

Posted by Daniel Hölbling on January 7, 2008

Hey! I just wanted to let you know that I was searching for about 20 minutes for the meaning an @!

E.g. in this code:

Regex r2 = new Regex(@"([\{a-z]+)([0-9]*) ");

You may notice that the @ in this Regex is outside the actual String and that has to mean somethign.


Stupid me found the answer!

Placing an @ before a string in C# tells the compiler to NOT use escape sequences within the string.


So you don't need to do stuff like \\ for a single \ etc.

Man why didn't I found out earlier!

Filed under net, programmierung
comments powered by Disqus

My Photography business

Projects

dynamic css for .NET

Archives

more