How to find source of error in Exception in Visual Studio

in exception details, stackTrace


Exclude comments when searching in Visual Studio

Exclude comments when searching in Visual Studio


use regular this expression –


  • ^ from beginning of line
  • ~( NOT the following
  • :b* any number of white spaces, followed by
  • // the comment start
  • ) end of NOT
  • .* any character may appear before
  • your_search_term your search term 🙂


How to add xml-stylesheet tags to an XML file using C#

XmlDocument doc = new XmlDocument();
        "type='text/xsl' href='xslFile.xslt'"));

- OR -

XmlDocument xDoc = new XmlDocument();
XmlProcessingInstruction pi = xDoc.CreateProcessingInstruction(
    "type=\"text/xsl\" href=\"cdcatalog.xsl\"");