PC Review Forums Newsgroups Microsoft DotNet Microsoft Dot NET Compact Framework using FileInfo class

Reply

using FileInfo class

 
Thread Tools Rate Thread
Old 04-12-2006, 03:33 AM   #1
=?Utf-8?B?R3V1cyBEYXZpZHNvbg==?=
Guest
 
Posts: n/a
Default using FileInfo class


Hi,

I was wondering if anyone could help me out,
I having issues with a component I have written for .net CF that I now need
to use in the .net desktop framework.

I am using the log4net library and need to read in my logging settings from
a file I place in the same location as my running executable.

In the compact framework the following call returns my location

System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase.ToString())

This returns my location as a URI

however on the Desktop frame work when I try and pass this into
FileInfo fi = new FileInfo(pConfigLoc);

it throws an exception about not supporting URI formats.


I am pretty new to C# and thought that this should work as is.

could anyone explain what I am doing wrong

thanks

Guus Davidson


  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off