Using Settings?
Post your questions regarding programming in C# in here.
4 posts
Page 1 of 1
I know in vb you use
my.settings.
who would you do this in c# for a if then
like
in vb it would be
but how do i show a form also for that matter lol.
my.settings.
who would you do this in c# for a if then
like
in vb it would be
Code: Select all
i know i left out the end ifIf my.settings.blah = "" then
Form1.show
but how do i show a form also for that matter lol.
Nailing my feet to the floor is easier than using my own muscles to balance, but you don't see me doing that 

Code: Select all
Or if you want blah to be a specific text , just replace null with text between quotation marks if(Properties.Settings.Default.Blah == null)
{
Form1 frm = new Form1();
frm.Show();
}

Thanks Axel 

Nailing my feet to the floor is easier than using my own muscles to balance, but you don't see me doing that 

or you can do
Code: Select all
using 'projectname'.Properties;
public class 'projectname'
{
private void button1_Click(object sender, eventargs e)
{
if (settings.default.something == null)
{
Form1 frm = new Form1();
frm.Show();
}
}
}
4 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023