开发者

write file in the same path as c# file

Is it possible to write file to th开发者_高级运维e same directory where the c# code that writes this file is ?

I mean something like there is c:\projects\myProject\test.cs

and when there is writeFile operation in test.cs

there is for example new file lest say test1.txt in c:\projects\myProject\test1.txt

I'm running asp.net application.


You're probably looking for Server.MapPath("~/Something.txt")


I think you can also try Application.StartupPath

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜