Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

My.Settings vs. My.MySettings

Status
Not open for further replies.

Sorwen

Technical User
Nov 30, 2002
1,641
US
I've been limitedly using My.Setting for a long time. I had not really got into understanding it very much. For instance if I allowed someone to modify any of the settings I always gave a restore default button that had the defaults hard coded in the code for the button. I found awhile back where you could pull the defaults you placed at design time instead. I forgot where I found them so I did a Google search and found that what should be used is the .Default method. So I typed My.Settings.Default.InputFileLocation and it gives me the standard warning about "Access of shared member, constant member, enum member or nested type through an instance; qualifying expression will not be evaluated." and suggests that I use My.MySettings instead. So that got me to wondering when should one use My.Settings and when should someone use My.MySettings. I did some Google searches and MSDN and found nothing talking about it. MSDN never mentions it in the explanations about using settings. All the examples use My.Settings. When I search specifically for My.MySettings it pulled up a few examples of it being used, but never mentioned why it is used instead of My.Settings.

It is like a few other instances I've found in vb.net that seems to just assume the difference is known. That it is a given you understand this. And I never find where others have asked about it. It sort of feels like when everyone was invited to a meeting where it was explained and you were not at work that day. Can someone explain what I missed when I didn't show up for the meeting? :)

-I hate Microsoft!
-Forever and always forward.
-My kingdom for a edit button!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top