Functions
名前空間にあるというクラスがありますSomeNameSpace
。Functions
クラスには、数式バーに表示する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
なぜこれが起こっているのか、可能であれば、どうすればやりたいことができるのかを理解してくれる人はいますか?