1

Functions名前空間にあるというクラスがありますSomeNameSpaceFunctionsクラスには、数式バーに表示するExcel数式を作成するために使用している関数がありGetCurrentValueます。公式方程式から始めたいのです=SomeNameSpace.Functions.GetCurrentValueが、これを試してみると

using System.IO;
using System;

namespace SomeNameSpace{
  public class Functions{
     public object GetCurrentValue (arg1, arg2...){
     //GetCurrentValue method implementation
     }
  }
}

using System.IO;
using System;
using SomeNameSpace;

namespace AnotherNamespace{
public static bool SetFormula (string newFormula){ //newFormula value is "GetCurrentValue"        
    string sTemp = "=SomeNameSpace.Functions.";
    string Formula = sTemp + newFormula;
    return true;        
}

Formulaにのみ設定され=GetCurrentValueます。また、たとえばsTemp以外の文字列に変更すると、が に設定されるため、完全に機能することにも気付きました。=SomeNameSpace.Functions.=SomeSpace.Functions.Formula=SomeSpace.Functions.GetCurrentValue

なぜこれが起こっているのか、可能であれば、どうすればやりたいことができるのかを理解してくれる人はいますか?

4

0 に答える 0