@ explanation pls
can someone explain what the @ symbol does in the following:
I've been seeing this a few times in other examples codes on completely different topics but always added beofre strings.
[DllImport(@"setupapi.dll", CharSet = CharSet.Auto, SetLastError = true)]
Telling the system what DLL the function is in?
It's a verbatim string, in this case, the same as had someone said "setupapi.dll" - There are no escapes inside a verbatim string, except for double quotes (which is "". not \"). My guess is that MS is finally tired of typing: "\\\\SERVER\\share\\path\\file" - @"\\SERVER\share\path\file"
i find it useful for regex as well.
Originally Posted by Cactus_Hugger
but p/Invoke works fine without that symbol.
Originally Posted by matsp
Thanks everyone else.