Geeks With Blogs
finally{} My interactions with .Net and Web development - What's most important is what happens finally{} February 2006 Entries
Getting a stream object from a MyJavascript(.js txtfile) - Resources
// Getting a stream object from a MyJavascript(.js txtfile) in the Resources. // In VS-2005 > .Net 2.0 objMyStream = new System.IO.MemoryStream( System.Text.Encoding.UTF8.G... Properties.Resources.MyJava... ......

Posted On Wednesday, February 8, 2006 9:53 AM

LOTD # 1 : Check the InnerException
Today, one of my teammate was getting a "TargetInvocationException" : Exception has been thrown by the target of an invocation. This reminded me of my 'initial learning curve' days in .Net when I encountered this exception, and had a really hard time fixing this one. I can't remember how we(There were other team members who worked on this as well and it was back in 2002-03) solved it. The beauty of the problem is you wouldn't know why you are being thrown this one, inspite of things working as they ......

Posted On Monday, February 6, 2006 1:31 PM

File path in C#

When you have to pass in a file path to do some processing with the file, try using the following C# code.

string path = Path.Combine(Environment.CurrentDirectory, @"..\..\TestDeserialization.xml");

Where,

The TestDeserialization.xml file is in the Project root directory.

It helps to avoid confusion in file paths.

Posted On Wednesday, February 1, 2006 1:39 PM

Copyright © Vinayak | Powered by: GeeksWithBlogs.net