HOW USE RELATIVE PATH IN C#.

Kenny Tangnde

Total Post:68

Points:476
Posted by  Kenny Tangnde
C# 
C#
 4461  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. Chris Anderson

    Post:65

    Points:455
    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. Kenny Tangnde

    Post:68

    Points:476
    Re: How use relative path in C#.

    Hi Rohit,

      thanks for your help.

  1. Kenny Tangnde

    Post:68

    Points:476
    Re: How use relative path in C#.

    Hi Rohit,

    You can give me some website address to learn SQL?

    thanks in advance.

  1. Chris Anderson

    Post:65

    Points:455
    Re: How use relative path in C#.

    Post is removed by the Admin.

  1. Uttam Misra

    Post:126

    Points:906
    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

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!