![](/img/trans.png)
[英]Join StringCollection with commas
通常,使用 string.Join() 很容易用逗號連接列表。 但是,今天遇到 StringCollection,string.Join() 輸出“System.Collections.Specialized.StringCollection”而不是逗號分隔的字符串。 我們如何 Join() 一 ...
[英]Join StringCollection with commas
通常,使用 string.Join() 很容易用逗號連接列表。 但是,今天遇到 StringCollection,string.Join() 輸出“System.Collections.Specialized.StringCollection”而不是逗號分隔的字符串。 我們如何 Join() 一 ...
[英]Windows Update API CopyToCache(IStringCollection) - Specified cast is not valid
為了減少我們的 VPN 路由上的流量,我需要從外部服務器下載 windows 更新,同時向我們的內部服務器報告。 所以我正在做以下事情: 創建一個 UpdateSession 並搜索更新,將它們存儲在 $SearchResult 中。 然后我從外部服務器下載更新,然后我想通過IUpdate2.Cop ...
[英]How to combine / merge two StringCollection into one in C#
如何在C#中組合/合並兩個StringCollection ...
[英]System.Collections.Specialized.StringCollection settings work fine in Debug and Release but crash on Deployment?
對於我最新的 WPF 應用程序,我一直在使用System.Collections.Specialized.StringCollection來保存和加載字符串。 我當前的系統在 Debug 和 Release 中就像一個魅力,但是當部署到 ClickOnce 時,只要涉及到任何設置(加載或保存),應用 ...
[英]Change sorting of StringCollection
在我當前的項目中,用戶可以創建一個停靠在TableLayoutPanel中的控件。 控件名稱保存在StringCollection中,並且在程序每次啟動時都會重新創建控件。 我想實現一個功能,允許用戶更改控件的順序。 活動部分正在工作,問題在於,下次啟動程序時,控件將以舊順序重新創建,因為 ...
[英]C# StringCollection in Custom Class
給定下面的類,將多個字符串添加到名為blob_key_col_name的StringCollection的正確方法是什么? ...
[英]Serialize String-collection object for storing in session variable
在我的ASP.Net應用程序中,我將字符串集合存儲在Session變量中。 一切正常,但現在我想將會話設置從In-proc更改為Out Proc。 現在,我遇到一個問題:“會話中存儲了不可序列化的對象”。 在將Sting Collection對象分配給會話變量之前,該如何序列化它? 請幫 ...
[英]How to access an indexed string from a string collection saved in settings?
我的設置中有一些字符串數組,分別標記為meas1,meas2,meas3等。 如果我想將每個字符串集合中的第六項設置為“”,我該怎么做? 以下是我失敗的失敗嘗試代碼: 我知道我可以做Properties.Settings.Default.meas1[5] = ""; 但我想我有 ...
[英]How to load assembly [Systems.Collections.Specialized.StringCollection] into Powershell
我半明白我的要求,並已盡我所能盡力對此進行研究。 我正在嘗試使用[Systems.Collections.Specialized.StringCollection]類型的對象: 我得到錯誤: new-object : Cannot find type [Systems.Colle ...
[英]StringCollection editor does not store the values entered by user
我已經在我的自定義控件中實現了StringCollection編輯器,下面是代碼: 這工作正常,但是每次我在集合中輸入一些值並重新打開它時..值都會丟失,即它不存儲值。 存儲用戶輸入的字符串的值時是否缺少任何內容,或者我是否需要實現自定義StringCollection以便用戶輸入 ...
[英]NullReference Exception was unhandled in foreach
MyProject.exe中發生了'System.NullReferenceException'類型的未處理異常 附加信息:對象引用未設置為對象的實例。 它說, StringCollection strCol為null,但table.Script()不為null(包括記錄)。 ...
[英]VB.NET Trying to read a System.Collections.Specialized.StringCollection in My.Settings returns an InvalidOperationException
在我的vb.net項目中,我使用Visual Studio的內置設置管理器創建了以下設置: appVisible(布爾值) saveFusedFiles(布爾) 顏色(System.Collections.Specialized.StringCollection) ...
[英]I am getting error like “constructor on type 'system.string' cannot found” for a User Control in C#?
對於usercontrol TextBox,我正在創建AutoCompleteCustomSource , AutoCompleteMode和AutoCompleteSource等屬性: 我正在創建這樣的但是我收到這樣的AutoCompleteCustomSource字符串集合的錯誤。 ...
[英]Transform a string possibly including quotes into a StringCollection
我有一個像這樣的字符串: 我想將其轉換為這樣的StringCollection: 一 二 三四 五 六七 有沒有一種方法可以使用asp.net C#2.0中的Regex類來實現此目的? ...
[英]How delete string from stringCollection saved in settings
我是這個社區的新手。 我有一個問題:我對如何在Windows窗體中保存在運行時創建的控件和代碼的工作方式非常滿意,但是當我想從stringCollection中刪除字符串時遇到了問題。 我使用了方法stringcollection.Remove(“ string”)插入剛剛存儲的有效字符串, ...
[英]Combine line for line in two separate StringCollections
我正在嘗試獲取兩個字符串集合,並同時合並兩個集合中的每一行,以為用戶顯示完整的文件路徑。 有助於消除混亂的示例: 字符串集合1將包含路徑列表。 例: 字符串集合2將包含文件名列表。 例: 每個列表都在同一行號中彼此保持密鑰,我只需要將它們組合以將其輸出給最 ...
[英]Initializing a StringCollection Setting
我正在編寫一個應用程序,我想存儲用戶選擇的文件列表。 目前,我的設置之一是名為 filesToFetch 的 StringCollection,它是用戶范圍的,包含程序應獲取的所有文件的路徑。 我有一個按鈕,允許用戶將新文件添加到列表中。 這是按鈕點擊事件的代碼 當我嘗試向 StringColl ...
[英]WPF string collection binding, need to convert to an element type
我有一個綁定到MenuItem的字符串集合,因為它是ItemsSource(字符串是用戶添加的代表文件夾路徑的書簽)。 但是,在字符串集合中,我可能會有一個字符串,例如連字符(“ ----”),我希望將其顯示為Separator元素。 但是,分隔符與MenuItem元素不同。 我需要某種方 ...
[英]Find the overlap of a set of equal length string?
有100萬個等長字符串(短字符串)。例如 ABCDEFGHI fghixyzyz ghiabcabc zyzdddxfg 。 。 。 我想找到兩個字符串的成對重疊.A“abcdefghi”和B“fghixyzyz”的重疊是“fghi”,它是A的最大后綴,B ...
[英]How to write contents of System.Collections.Specialized.StringCollection to file?
我沒有運氣搜索顯而易見的地方,以回答為什么使用File.WriteAllLines(); 輸出StringCollection時不起作用: 在這里省略已填充的感染日志代碼....... 任何人都可以告訴我我做錯了什么,或者指出一個令人滿意的解釋方向? ...