這裏的代碼是X ++。我對此知之甚少,儘管我對C#很熟悉。 MS表示它的語法類似於C++和C#。構造關鍵字在添加到方法時做了什麼?
無論如何,我假設下面的代碼是一種方法。它具有「構建」作爲關鍵字。
什麼是結構/構造方法?構造關鍵字在應用於函數時會發生什麼變化? 另外,我錯在假設代碼會創建某種無限循環?
我的假設是它的返回類型爲「InventMovement」的方法。
static InventMovement construct(Common buffer, InventMovSubType subType = InventMovSubType::None, Common childBuffer = null)
{
InventMovement movement = InventMovement::constructNoThrow(buffer,subType,childBuffer);
if (!movement)
throw error("@SYS20765");
return movement;
}
謝謝! Kevin
真的不能用常理;-) – 2009-06-26 17:49:31