vb6 to c# conversion

  • Thread starter Thread starter Starbuck
  • Start date Start date
S

Starbuck

HI

Having nearly completed a VB6 to c# conversion I have a couple of things
outstanding.
While doing the conversion I have found it interesting to find pure c#
equivelants to VB code.
However there is a couple I still have not replaced, these are

Microsoft.VisualBasic.Chr(10)
Microsoft.VisualBasic.Chr(13)
Microsoft.VisualBasic.Kill(DirIn & "Error.*")
if not Microsoft.VisualBasic.Dir(d,
Microsoft.VisualBasic.FileAttribute.Directory) = "" Then IsDir = True

Any thoughts on how to do these please folks
Thanks
 
Microsoft.VisualBasic.Chr(10)
Microsoft.VisualBasic.Chr(13)

'\n' and '\r' respectively.

Microsoft.VisualBasic.Kill(DirIn & "Error.*")

using System.IO;
....
DirectoryInfo di = new DirectoryInfo( DirIn );
foreach ( FileInfo fi in di.GetFiles( "Error.*" ) )
fi.Delete();

if not Microsoft.VisualBasic.Dir(d,
Microsoft.VisualBasic.FileAttribute.Directory) = "" Then IsDir = True

isDir = Directory.Exists( d );



Mattias
 
Thanks Guys



Mattias Sjögren said:
'\n' and '\r' respectively.



using System.IO;
...
DirectoryInfo di = new DirectoryInfo( DirIn );
foreach ( FileInfo fi in di.GetFiles( "Error.*" ) )
fi.Delete();



isDir = Directory.Exists( d );



Mattias
 
Back
Top