日期:2014-05-17  浏览次数:21242 次

先能帮忙把这段JAVA代码转换成C#,非常感谢!
import com.travelsky.ibe.client.FD;
import com.travelsky.ibe.client.FDResult;
import com.travelsky.ibe.exceptions.IBEException;
public class FFtest {

public static void main(String[] args) {
FD fd=new FD();
   try {
FDResult fdres = fd.findPrice("kmg","ljg","18sep08","all","","AD",true);
System.out.println(fdres);
System.out.println("机场费:"+fdres.getAirportTax(0));
System.out.println("燃油税:"+fdres.getFuelTax(0));

System.out.println(fdres);
}catch(Exception e){
e.printStackTrace();
}
}
}

------解决方案--------------------
import com.travelsky.ibe.client.FD;
import com.travelsky.ibe.client.FDResult;
import com.travelsky.ibe.exceptions.IBEException;

=>

namespace com.travelsky.ibe.client.FD;
namespace com.travelsky.ibe.client.FDResult;
namespace com.travelsky.ibe.exceptions.IBEException;

public class FFtest
{
public static void Main(string [] args)
{
FD fd = new FD();
try
{
FDResult fdres = fd.findPrice("kmg","ljg","18sep08","all","","AD",true);
Console.Writeln(fdres);
Console.Writeln("机场费:"+fdres.getAirportTax(0));
Console.Writeln("燃油税:"+fdres.getFuelTax(0));
}
catch(Exception e)
{
Console.WriteLine(ex.StackTrace);
}
}
}

------解决方案--------------------
有用的代码全在
import com.travelsky.ibe.client.FD;
import com.travelsky.ibe.client.FDResult;
import com.travelsky.ibe.exceptions.IBEException;
这几个库中