How to determine if a given path is a relative path in C#

0 Comments

If you want to determine if a given path is a relative path in C#, you can use the System.IO.Path.IsPathRooted function: bool isPathRooted = Path.IsPathRooted("Test.txt"); Console.WriteLine(isPathRooted); Result: False bool isPathRooted = Path.IsPathRooted(@"\\nas\Test.txt"); Console.WriteLine(isPathRooted); Result: True

ReportViewer control does not show default images on IIS7

3 Comments

If you use the ReportViewer control in you’re C# web application and the ReportViewer does not show the default images (refresh button etc) then you can check you’re web.config if it contains the correct axd

How to sum TimeSpan in LINQ with C#

0 Comments

If you want to sum TimeSpan properties in LINQ with C#, use: List<TimeSpan> list = new List<TimeSpan>             { new TimeSpan(1), new TimeSpan(2), new TimeSpan(3) }; // TimeSpan.Zero is the initial offset, in this case 0

How to start suspended MSDN subscription download with TransferMgr.exe

0 Comments

When you download software with you’re MSDN subscription account and suspend you’re download, you can resume the download by starting “C:\Windows\Downloaded Program Files\TransferMgr.exe” and press resume. I found the location of this executable by starting