Skip to main content
0 votes
0 answers
76 views

Properties.Settings.Default is not working after I publish my Winforms Project

I have a TreeView in which I show the Folder Structure of my PC. I built in a Feature, that opens the last selected Path when opening the Application again. To save these Paths, I created a Setting ...
BEEIgartner's user avatar
0 votes
0 answers
10 views

Any idea why new StringCollection().AddRange( SomeStringArray[]) throws an error?

I just stumbled across this: new StringCollection().AddRange(SomeStringArray[]) throws an error: "Cannot implicitly convert type 'void' to 'System.Collections.Specialized.StringCollection'"...
JRrelyea's user avatar
  • 199
0 votes
1 answer
493 views

Join StringCollection with commas

Usually, joining a List with commas is easy using string.Join(). However, coming across a StringCollection today, string.Join() outputs "System.Collections.Specialized.StringCollection" ...
Denis G. Labrecque's user avatar
0 votes
2 answers
693 views

Initializing a StringCollection from My.Settings to avoid null reference exception

I am specifying a System.Collections.Specialized.StringCollection named MyCollection in My.Settings, and upon first use to add a string, a null reference exception is being thrown (i.e. MyCollection ...
user avatar
0 votes
1 answer
333 views

Windows Update API CopyToCache(IStringCollection) - Specified cast is not valid

For reducing traffic on our VPN routes, I need to download the windows updates from an external server while reporting to our internal server. So I'm doing the following: Create an UpdateSession and ...
Eldo.Ob's user avatar
  • 794
-3 votes
1 answer
45 views

Can’t set StringCollection’ string [duplicate]

I have code PrinterSettings set = new PrinterSettings(); set.PrinterName = set.InstalledPrinters[0]; I can’t compile it because of error (Google translate): it is not possible to access this via an ...
Okumaima's user avatar
1 vote
4 answers
717 views

How to combine / merge two StringCollection into one in C#

How to combine / merge two StringCollection in C# var collection1 = new StringCollection () { "AA", "BB", "CC" }; var collection2 = new StringCollection () { "DD&...
Rahul Uttarkar's user avatar
1 vote
0 answers
280 views

How to edit StringCollection in C# PropertyGrid? ["Constructor in type 'System.string' not found"]

Using Settings Editor I created some user settings for my application. In one specific instance, I need a setting to be an array of strings. The only option I encounter is StringCollection: Choosing ...
B_K's user avatar
  • 11
1 vote
1 answer
1k views

System.Collections.Specialized.StringCollection settings work fine in Debug and Release but crash on Deployment?

For my latest WPF application, I've been using an System.Collections.Specialized.StringCollection to save and load strings. My current system works like a charm in Debug and Release, but when deployed ...
ThomasFrew's user avatar
1 vote
0 answers
1k views

Difference between Specialized String collection and Generic list C#

What is the difference between a Specialized String Collection and a Generic String List in C#? And how to convert a Specialized one into a Generic one? System.Collections.Specialized....
Dave's user avatar
  • 2,102
0 votes
3 answers
436 views

Change sorting of StringCollection

On my current project the user can create a control that gets docked in a TableLayoutPanel. The controls name gets saved in a StringCollection and on every start of the program the controls get ...
Backslash's user avatar
  • 109
0 votes
1 answer
91 views

C# StringCollection in Custom Class

Given the class below, what would be the correct way to add multiple strings to the StringCollection called blob_key_col_name? public class blob_info { public string column_name { get; set; } ...
user3308131's user avatar
0 votes
1 answer
2k views

Serialize String-collection object for storing in session variable

In my ASP.Net application, I'm storing a string collection in a Session variable. It was working fine but now I want to change session settings from in-proc to Out Proc. Now I'm having an issue that "...
rinesh's user avatar
  • 535
0 votes
0 answers
74 views

String Collections in Settings aren't changing their size

I have several string collections in my C# project that are stored in Settings. At the beginning of this project, I had initialized these collections to contain 20 values, all being 0s. Lately I've ...
J.Doe's user avatar
  • 733
0 votes
1 answer
206 views

How to access an indexed string from a string collection saved in settings?

I have a few arrays of strings in my settings labelled meas1, meas2, meas3 etc... If I want to set the 6th item in each string collection to "", how would I do that? Below is my broken code of ...
J.Doe's user avatar
  • 733

15 30 50 per page