Thread: Utility Dom3 Unit Maker v1.07
View Single Post
  #38  
Old April 30th, 2007, 10:57 AM
lch's Avatar

lch lch is offline
General
 
Join Date: Feb 2007
Location: R'lyeh
Posts: 3,861
Thanks: 144
Thanked 403 Times in 176 Posts
lch is on a distinguished road
Default Re: Dom3 Unit Maker

P.S.: Since I'm getting the Dom3 server monitor tool ready for Linux / Mono, too, and there is the same trouble as here: Probably the best way of getting the full path for a file is to use Path.Combine. Example code:

Code:
using System;
using System.IO;
public class Test {
public static void Main(string[] args) {
string s = Path.Combine(Environment.GetEnvironmentVariable("HOME"), "test");
Console.WriteLine(s);
Console.WriteLine(File.Exists(s));
Console.WriteLine(Directory.Exists(s));
}
}



I didn't have any experience with C# so far, but it sure is nice, I must admit.
__________________
Come to the Dom3 Wiki and help us to build the biggest Dominions-centered knowledge base on the net.
Visit my personal user page there, too!
Pretender file password recovery
Emergency comic relief
Reply With Quote