In VB.NET i used to have a Module. I need to Call the Main Form when the login is successfully. So this is what i deed in C# so Far in a Class, Can someone Help me on this in C#. Becaues C# does not have Modules.
Code:
using System;
using System.Collections.Generic;
using System.Text;
namespace SystemAdmin
{
class Startup
{
public void Main()
{
bool loggedIn;
frmLogin frmlogin = new frmLogin();
loggedIn = (frmlogin.ShowDialog() == DialogResult.OK);
if (loggedIn)
{
Application.Run(new frmmain());
}
}
}
}
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
Well Modules in VB have their downsides...
People prefer declaring all their public variables inside a module, but that doesn't make your program 100% object oriented - I guess it's just my opinion...
One option may be to make sealed classes with private constructors ( where all the members are static )
TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!) 2008, 2009,2010 In theory, there is no difference between theory and practice; in practice there is.
* Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions
* How NOT to post a question here
* Of course you read this carefully before you posted
* Need homework help? Read this first
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
1) you do not have a class named "frmLogin" in the current namespace, nor do you have a "using" statement to import the namespace.
2) You do not have the proper namespace for Dialog Result.
A simple "right-click" and "Resolve..." will address the issues, if the proper assemblies are referenced in your project.
TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!) 2008, 2009,2010 In theory, there is no difference between theory and practice; in practice there is.
* Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions
* How NOT to post a question here
* Of course you read this carefully before you posted
* Need homework help? Read this first
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.