More pseudo-registers

April 30th, 2008

There is another pseudo-register useful when working with C# language:

$exception

It contains last exception that is thrown by an application.
Suppose that we have code like this:

C#:
  1. try
  2. {
  3.     // something
  4. }
  5. catch
  6. {
  7.     // do something else
  8. }

with $exception pseudo-register you can easily examine it:

exception

Pseudo-registers in VS debugger

April 12th, 2008

I found a very interesting feature of Visual Studio's debugger. It's been there for a long time but many developers do not know (including me) that pseudo-registers can be helpful.
There are more registers but I will mention just two of them.

@ERR

Well, it returns the same as GetLastError(), It optionally can return formatted string - just write it like @err,hr
I think I don't need to add more, screens below are self-explanatory

Code
Watch window

$user

Provides many informations about a user executing current process

Watch window - user

Happy debugging.

Did you know - C#

April 12th, 2008

Did you know where the C# name come from? I didn't :D
According to wikipedia: "The name "C sharp" was inspired from musical notation where a sharp indicates that the written note should be made a half-step higher in pitch".

Stupid :D

Designed by SirMike © All rights reserved

Valid XHTML 1.0! Valid CSS!

Powered by Rootnode