I need to import a DLL using the Class.cs...this is what i have but its not correct..

VB Code:
  1. static [System.Runtime.InteropServices.DllImport("dll file name")]

The Other issue i'm having is i used the Covert Tool in Visual Studio to upgrade a VB6 project to VB.NET,the Problem i having is with the F = FreeFile,
F = Split(LTD, ":")....

Here is the VB6 Code:

VB Code:
  1. Dim LTD As String, F As Variant, x As Integer
  2.  
  3. F = FreeFile
  4.     With CommonDialog1
  5.         .FileName = ""
  6.         .DialogTitle = "Load bots List"
  7.         .Filter = "All Supported Types|*.txt"
  8.         .ShowOpen
  9.         If .FileName = "" Then Exit Sub
  10.         Open .FileName For Input As #F
  11.             While Not EOF(1)
  12.             Input #1, LTD
  13.             F = Split(LTD, ":")
  14.             If x < 1000 Then
  15.             Set Item = ListView1.ListItems.Add(, , , , 2)
  16.             Item.SubItems(1) = F(0)
  17.             Item.SubItems(2) = F(1)
Now when i used the Convert tool in VS 2005 to VB.NET the F = FreeFile was changed too:

F = FileSystem.FreeFile

I know the FileSystem is refering to the VB FileSystem used in Visual Basic .NET..I need to get that Over into C# along with the F = Split(LTD, ":"),
everything else i have already Reworked into C#..