Click here to Skip to main content
       

C#

 
QuestionFull path name of .cs file [modified] PinmemberTheGermoz20-Nov-12 10:35 
Is there a way to return the full path name of the file containing the code?
suppose I have the following class in the file c:\myproject\CA.cs
// CA.cs
public static class A
{
public static void Show()
{
string myFile = .... // here should read where the code is i.e c:\myproject\CA.cs
Console.WriteLine(myFile);
}
}


modified 20-Nov-12 17:08pm.

AnswerRe: Full path name of .cs file PinmemberGarth J Lancaster20-Nov-12 11:42 
AnswerRe: Full path name of .cs file Pinmemberjschell20-Nov-12 12:24 
AnswerRe: Full path name of .cs file PinmemberPIEBALDconsult20-Nov-12 12:56 
GeneralRe: Full path name of .cs file PinmemberTheGermoz20-Nov-12 17:28 
GeneralRe: Full path name of .cs file PinmemberPIEBALDconsult20-Nov-12 18:06 
GeneralRe: Full path name of .cs file PinmemberTheGermoz20-Nov-12 18:12 
GeneralRe: Full path name of .cs file PinmvpRichard MacCutchan20-Nov-12 21:34 
GeneralRe: Full path name of .cs file PinprotectorPete O'Hanlon20-Nov-12 22:10 
GeneralRe: Full path name of .cs file PinmemberPIEBALDconsult21-Nov-12 3:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web04 | 2.8.140921.1 | Last Updated 22 Sep 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid