My.Settings

  • Thread starter Thread starter Fox
  • Start date Start date
F

Fox

NewBie question.

How can access the project setting in C#?

I can access the project setting in VB (My.Settings).
 
Fox,

I would assume you are using the Windows Application Framework, if so, then
you might find this is not available in c# currently.

Regards
Scott Blood
 
OIC Thank.
scott blood said:
Fox,

I would assume you are using the Windows Application Framework, if so,
then you might find this is not available in c# currently.

Regards
Scott Blood
 
How can access the project setting in C#?

I can access the project setting in VB (My.Settings).

If you mean settings you can set from Project => Properties => Settings..
then you could use something like this (assuming you have FormSize in
settings) to set for example form size:

this.Size = Properties.Settings.Default.FormSize;

check small example in
http://www.sorrowman.org/c-sharp-programmer/save-user-settings.html where I
use that way to set things.
 
My.Settings and My.Resources have direct equivalents in C# via the
autogenerated Settings and Resources classes in your project (both in the
Properties namespace).
(Other My equivalents are a little less direct).
--
David Anton
www.tangiblesoftwaresolutions.com
Instant C#: VB to C# converter
Instant VB: C# to VB converter
Instant C++: C# to C++ converter & VB to C++ converter
Instant J#: VB to J# converter
 
Back
Top