小编use*_*890的帖子

SAXParser相当于C#

我有以下java代码,我需要在C#中转换这些,请帮助我..

public class Configuration {

  private ConfigContentHandler confHandler;

  public Configuration() {
  }

  public boolean parseConfigFile() throws Exception {
    boolean bReturn = true;

    SAXParser parser = SAXParserFactory.newInstance().newSAXParser();

    System.out.println("*** Start parsing");

    try {
       confHandler = new ConfigContentHandler(100);
       // Configuration file must be located in main jar file folder

       // Set the full Prosper file name
       String sConfigFile = "configuration.xml";

       // Get abstract (system independent) filename
       File fFile = new File(sConfigFile);

       if (!fFile.exists()) {
          System.out.println("Could not find configuration file " + sConfigFile + …
Run Code Online (Sandbox Code Playgroud)

c# saxparser

6
推荐指数
2
解决办法
1万
查看次数

在C#中使用小数进行转换

private int FindNumber(string sPar)
   {
      // Get the last number
      int len = sPar.Length;
      string s = sPar.Substring(len-1);
      return new (int)Decimal(s);
   }
Run Code Online (Sandbox Code Playgroud)

在这我得到错误; 要求.任何人都可以帮助我.

谢谢!

c#

1
推荐指数
1
解决办法
231
查看次数

标签 统计

c# ×2

saxparser ×1