How use relative path in C#.

Total Post:68

Points:476

C# 
C#
 5152  View(s)
Ratings:
Rate this:

Hi all,

 How use relative path in C#.

Such as:

con = new OleDbConnection(@"provider=microsoft.jet.oledb.4.0;data scource=C:\MyProject\Product.mdb");

 

thanks.

  1. Re: How use relative path in C#.

    Hi,

    You can use relative path by using GetFullPath method of the Path class that exist in the System.IO namespace.
    Try this:
             Console.WriteLine("The relative path 'file.txt' " + System.IO.Path.GetFullPath("file.txt"));

  1. Re: How use relative path in C#.

    Hi Rohit,

      thanks for your help.

  1. Re: How use relative path in C#.

    Hi Rohit,

    You can give me some website address to learn SQL?

    thanks in advance.

  1. Re: How use relative path in C#.

    Aken ...here you go..
    https://www.mindstick.com/DeveloperSection/Beginner
    Join mindstick beginners section...
    Cheers!

      Modified On Mar-14-2016 08:21:28 AM

Answer

Please check, If you want to make this post sponsored

You are not a Sponsored Member. Click Here to Subscribe the Membership.