app.path ?

Hi,

What's the alternate of App.Path in VB.NET 

Here is the VB 6.0 example of App.Path. 

fileName = App.Path & "\Debtors.INI" 


Thanks in advance:-) 

Kash


Answer this question

app.path ?

  • esparagus

    Not sure what's the conversion in VB.NET, but in C# it's Application.StartupPath, it should be close to similar in vb.NET
  • zzy

    Here is an example of how I might do this in VB.Net:

    Dim appPath As String
    Dim fileName As String

    appPath = Path.GetDirectoryName([Assembly].GetExecutingAssembly().Location)
    fileName = Path.Combine(appPath, "test.ini")

    HTH

  • oz123

    Application.StartupPath is the same in VB.NET as it is in C#

    Also AppDomain.Current.BaseDirectory should work

  • app.path ?