Groups | Blog | Home
all groups > dotnet interop > february 2006 >

dotnet interop : Repace doesn't work under Windows 98



Gregory Khrapunovich
2/28/2006 6:23:00 PM
I am using Visual Studio 2003 (Framework 1.1) with Windows Forms/C#. At
some point my application executes a simple statement:

string filename = Application.ExecutablePath.Replace(".exe", ".xml");

When I tested the applications under three different operating systems, it
turned out that the above line works fine under Windows XP and 2000, but it
doesn't work under Windows 98. When I run it under Win98, Replace command
returns the application file name unchanged (...exe). I verified it with the
MessageBox.

I have installed the same framework 1.1 to all three operating systems (XP,
2000, 98).

Can somebody explain what's happening?

Gregory Khrapunovich

Gregory Khrapunovich
3/1/2006 12:09:19 PM
[quoted text, click to view]

I tried it and it worked! Thank you. The strange thing is that ".exe" was
always in lower case and unsuccessfull "Replace" command returned it as
"....exe" (not "....EXE")
Gregory

£ukasz
3/1/2006 2:35:12 PM
Gregory Khrapunovich napisa³(a):
[quoted text, click to view]

string filename = Application.ExecutablePath.ToLower().Replace(".exe",
".xml");

also doesn't work??

AddThis Social Bookmark Button