473,473 Members | 1,972 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

bug... in InvalidPathChars

string s = "";

for(int i = 0; i< Path.InvalidPathChars.Length; i++)

{

s += Path.InvalidPathChars[i] + " ";

}

MessageBox.Show(s);

shows only " | < >

but there should be at least two more: ? and *

Can you confirm the bug or is that normal behaviour (how could it possibly
be?)

david
Nov 16 '05 #1
1 1532
These chars are not meant to be displayed in windows using MessageBox.Show.
One of the chars is a null (0x0000) character (and Show drops all chars
behind the null) while others cannot be displayed or displayed correctly.

Willy.

"David Krmpotic" <fa**@nowhere.biz> wrote in message
news:cp*********@news3.newsguy.com...
string s = "";

for(int i = 0; i< Path.InvalidPathChars.Length; i++)

{

s += Path.InvalidPathChars[i] + " ";

}

MessageBox.Show(s);

shows only " | < >

but there should be at least two more: ? and *

Can you confirm the bug or is that normal behaviour (how could it possibly
be?)

david

Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: GregMa | last post by:
Does anyone have a good regex expression to replace any invalid filename characters in a string? Those characters are: /, \, :, *, ?, ", <, >, | I have it right now with string.replace for each...
5
by: | last post by:
Hello Guys, I am trying to render an Xml dataset into HTML using XSLT. When I am loading the XSLT file into transform object to render it. Here is the code snippet: <!-- XslTransform...
2
by: Leon | last post by:
Hello all, I have come across an issue with the fix KB886903 - http://www.microsoft.com/technet/security/Bulletin/MS05-004.mspx which is to do with the ASP.Net path validation vulnerability....
1
by: Bishoy George | last post by:
I want a link to a nice documentation about writing to a server file by C# using System.IO; .
8
by: Nikolay Petrov | last post by:
I need a way to strip chars from a string. The chars are all chars that are not allowed in file path. TIA
4
by: Charles Law | last post by:
I'm sure I will kick myself when you tell me, but is there a simple way to test for the existence of any character in string1 being present in string2? For example, if s1 = "abracadabra" and s2 =...
4
by: Terry Olsen | last post by:
In my NNTP program, i'm using the Message-ID's as the filename (to eliminate duplicate messages coming in from different groups). My program has been working fine for months until I received some...
2
by: ImageAnalyst | last post by:
Tom, Nikolay: That code doesn't work, at least not in VS2005. What happens is that when you replace with VBNullChar, it basically chops off the string from that point onwards. So Sna?*|fu" would...
3
by: schaf | last post by:
Hi ! I have determined, that Path.InvalidPathChars does not return an array with all invalid path characters. For instance the question mark (?) does not appear in the array, but it is not...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.