devxlogo

August 15, 2009

Decoding General Compiler Error Messages

Error: Undeclared Identifier Example error message: doy.cpp: In function ‘int main()’: doy.cpp:25: ‘DayOfYear’ undeclared (first use this function) doy.cpp:25: (Each undeclared identifier is reported only once for each function it

Get the Name of the Executing ASP.NET Page

You can use the following server-side code to get the name of the currently executing ASP.NET page (e.g. default.aspx, hello.aspx). string sPagePath = System.Web.HttpContext.Current.Request.Url.AbsolutePath; System.IO.FileInfo oFileInfo = new System.IO.FileInfo(sPagePath); string

Global Exception Handling in WPF

In XAML, you can hook an application-level event that will fire whenever an unhandled error occurs anywhere in your application by overriding the OnStartup event in the App.xaml.cs file. Here’s