Search code examples
c#immediate-window

Static Class Method in Immediate Window


If I have a class FilePathHandler which has a static method FormatSubPath and I breakpoint in my code is there a way to call this method either in the immediate window or watch window?

Usage;

var temp = FilePathHandler.FormatSubPath(path);

If I write the above in the Immediate window to test something on the fly during a breakpoint, I get the error "error CS0103: The name 'FilePathHandler' does not exist in the current context". Is there anyway to do this or is it not possible?


Solution

  • Try using with its complete namespace? i.e NameSpace.FilePathHandler.FormatSubPath(path);