February 2006 Entries
// 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...
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...
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.Cu... @"..\..\TestDeserialization... Where, The TestDeserialization.xml file is in the Project root directory. It helps to avoid confusion in file paths