out

    1熱度

    1回答

    我試圖從代碼中獲取的dll調用方法。 外國方法來調用: ​​ 當我打電話用下面的代碼的方法: string errorMessage; someMethod.Invoke(activator, new object[] {out errorMessage}); 我得到以下錯誤 「出的errorMessage」: 語法錯誤,」, 'expected','或'}' 當我忽略out前綴時正確調用該

    0熱度

    2回答

    我發現了一個我無法解釋的奇怪問題。我已經找到了解決最初問題的方法,但想知道爲什麼以及如何發生下列情況。因爲即使在查看文檔後我也無法解釋這種行爲。 首次發行 我有它通過out參數解析一個CSV文件並返回錯誤和/或解析記錄列表的功能如下: public IEnumerable<string> ParseCsv(string file, out IEnumerable<string> records)

    0熱度

    1回答

    我是Python新手,我想學習Backtracking算法。我看了一些教程,我創造了這個代碼: x = [] pod = [] class def_pod: ins1 = 0 ins2 = 0 def __init__(self, name): self.name = name ins_start = int(input("Insula de sta

    0熱度

    1回答

    我創建了一個用戶表單,它在數組中獲取儘可能多的輸入。每一個新值輸入數組的時間做了較大 當獲得的第二輸入我弄下標越界 Sub getFlow() Do thisFlow = UserForm4.TextBox1.Value If Val(thisFlow) >= 0 Then If isInitiated = True Then ReDim Pr

    -2熱度

    2回答

    我讀,讓我停在某行代碼: List<object> props = new List<object>(); DoWork(param1, param2, props); //props.Count grew up 我的想法是改變其範圍以外的變量需要把它當作out或ref,但後來我意識到,除非DoWork方法的變化像props參考: props = new List<object>(); 參

    -6熱度

    1回答

    Ref和Out可以更改函數參數的行爲。有時我們希望將一個變量的實際值作爲參數進行復制。其他時候我們想要參考。這些修飾符影響明確的賦值分析。 我的問題是:可以在C#中的部分方法有ref,out,可選的輸入參數?

    0熱度

    1回答

    我目前正在開發一個Objective C級ClassA,我想實現類似NSURL方法- (BOOL)getResourceValue:(out id __nullable * __nonnull)value forKey:(NSString *)key error:(out NSError ** __nullable)error使用out id *的方法實現方法- (BOOL)changeStrin

    1熱度

    8回答

    轉換一個字符串列表 我有這個字符串:到 s字符 string input = "1,2,3,4,s,6"; 留意。 我只是想使用LINQ將這個字符串轉換爲List<int>。我最初嘗試了這種方式: var myList = new List<int>(); input.Split(',').ToList().ForEach(n => myList.Add(int.TryParse(

    1熱度

    1回答

    我有一些我想要聚合的數據,但是我得到索引超出界限的錯誤,我似乎無法弄清楚爲什麼。這裏是我的代碼: if period == "hour": n=3 tvec_a=np.zeros([24,6]) tvec_a[:,3]=np.arange(0,24) data_a=np.zeros([24,4]) elif period == "day": n=

    0熱度

    1回答

    我安裝 Eclipse Platform Version: 3.8.1 Build id: M20120914-1540 我想安裝Maven。 我遵循的步驟: Help->Install New Software M2Eclipse" and Location as http://download.eclipse.org/technology/m2e/releases/1.3 我得