|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Backslash convention for path and file namesI guess there must be some convention or Windows specification for
whether the backslash immediately preceding the file name in a full path string to a file is formally part of the path string or of the file name. I suppose the options are: 1. Part of the path string, ie all returned path strings should have a trailing backslash. 2. Part of the file name, ie all file names should start with a backslash. 3. Neither, in which case one should presumably always expect to add a backslash explicitly to the file name when building the full path string to a file from its constituent path and file name. Anyone enlighten me please as to what the preferred practice might be? JGD John,
>3. Neither, in which case one should presumably always expect to add a Use the System.IO.Path class for building the path. That way, you>backslash explicitly to the file name when building the full path >string to a file from its constituent path and file name. > >Anyone enlighten me please as to what the preferred practice might be? don't have to worry about it yourself. Personally I see the backslash as a separator, and therefore it's not really part of either side. Mattias -- Mattias Sjögren [C# MVP] mattias @ mvps.org http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com Please reply only to the newsgroup. "John Dann" <n***@prodata.co.uk> schrieb: Simply use 'System.IO.Path.Combine'.> 3. Neither, in which case one should presumably always expect to add a > backslash explicitly to the file name when building the full path > string to a file from its constituent path and file name. -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/>
WebBrowser1.DocumentText
Multithreaded Updating of StatusBar Right function Sudoku array-problem problem with string function in vb.net XML or SQL Server? Font size not right when converting from RTF to Web DLL in VB.NET Publishing An ASP.NET Website With Visual Studio .NET 2005 Add columns in Datagrid |
|||||||||||||||||||||||