|
I have a dictionary of strings that i want the user to be able to add/remove info from then store it for them so it they can access it the next time the program restarts
I am unclear on how i can store a dictionary as a setting. I see that under system...
Started by Crash893 on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
You....
Ultimately the Settings without any problem.
Other than doing something like David's suggests , I would look into alternate storage for the Dictionary .
Then you just need to store 1 string in the settings file.
string.
|
|
My product is targeted to a Portuguese audience where the comma is the decimal symbol. I usually use CString::Format to input numbers into strings, and it takes into account the computer's regional settings. While in general this is a good approach, I...
Started by djeidot on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
(MFC and SQL has been a while - turns out this is bloody ... .
It's not really trivial to do SQL injection with just numbers, but CString::Format is just not the correct way to do parameter binding .
Bad idea, you really should be using prepared statements.
|
|
I want to sort list of strings with respect to user language preference. I have a multilanguage Python webapp and what is the correct way to sort strings such way?
I know I can set up locale, like this:
import locale locale.setlocale(locale.LC_ALL, ''...
Started by Jiri on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
IMO it should be better....
Given the documentation warnings, it seems you are on your own if you try to set locale diffrently set of bindings to it!
You will want the latest possible ICU under your pyICU to get the best them with ORDER BY.
|
Ask your Facebook Friends
|
I deployed my asp.net web app project that has a reference to my DAL class library. How can I change the connection string in my DAL library once deployed? The DAL code was ignoring my web.config connection string and trying to use the app.config value...
Started by Breadtruck on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
By specifying that the application should include a connection-string named "FOO", or (much better) allowing the calling application to pass (one of) the connection key, the connection string objects I make a call to the web.config file....
|
|
Windows Forms application:
MainForm.cs - Windows Form Settings.settings - Settings class with an entry named "Test" Auxiliary.cs I can access the "Test" setting in my Settings.settings class within my MainForm.cs file just fine:
Settings.Default.Test ...
Started by roosteronacid on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
String test = Settings.Default....
So try ApplicationName.Properties; ...
By prepending Settings with the namespacename like this:
String testVisual Studio places the Settings in the ApplicationName .Properties namespace by default.
|
|
I've written a class that should allow me to easily read and write values in app settings:
public static class SettingsManager { public static string ComplexValidationsString { get { return (string)Properties.Settings.Default["ComplexValidations"]; } ...
Started by agnieszka on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
I know....
settings scope must be user not application
Are you sure it's not saving the changes:\Documents and Settings\[user]\Local Settings\Application Data\[company name]\[application].exe[hash string]\[version]\user.config .
|
|
Why does (string)int32 always throw: Cannot convert type 'int' to 'string'
public class Foo { private int FooID; public Foo() { FooID = 4; string s = (string)FooID; //throws compile error string sss = FooID.ToString(); //no compile error } }
Started by tanbuckeye on
, 8 posts
by 8 people.
Answer Snippets (Read the full thread at stackoverflow):
Maybe to convert int to string, the ....
However, they have Int32.ToString();.
Int doesn't have an explicit operator to string.
That's what the ToString method is for.
Because there is no type conversion defined from Int32 to string.
|
|
I am trying to convert a LPCSTR string into LPCTSTR string. i want to concatenate two string,when i try like this
LPCTSTR str1 = L"Raja" LPCSTR str2 = "Kumar" wcscat_s(str1,(LPCTSTR)str2);
i found the o/p like Raja....r(junkvalues)....how can typecast...
Started by Rajakumar on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
You need to convert one to be a wide string, you'd need....
Further, you cannot possibly concatenate a wide string and a plain char string.
LPCTSTR can be either plain char or wide characters depending on your project settings.
|
|
When I try:
LinkedList<String> stringList = new LinkedList<String>();
I get the following compilation error:
type LinkedList does not take parameters
What am I missing? Can't you do this?
Started by FarmBoy on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Language settings set to Java 5+ and that is a java.util.LinkedList then your code is perfectly in your build or IDE set to pre-5.0 (so no generics support)?
By the way, the best way to do.
|
|
I'm trying to save a string variable from my FolderBrowserDialog.SelectedPath().
Using a breakpoint I can see that the string is correctly loaded onto SelectedPath(), but I can't save that string to the .settings file for the life of me. Any help?
public...
Started by John McClane on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Properties.Settings.Default.Save();
Check out Using Settings in C# ..
|