PDA

Click to See Complete Forum and Search --> : Can someone please take a peek at my code and tear it appart...


Wokawidget
Feb 2nd, 2006, 05:12 PM
This is my 1st c# project ever. I have not been doing c# for long, but have pushed myself on a crash course with help from people here.

I would really appreciate if someone can look at my code and tell me I am a muppet and I'm doing things wrong.

It's got 4 projects and uses inheritance, interfaces, parent child colelction domain model classes plus some other stuff, so it's an all round beginner project.


All it does is load 3 users into a combo, very simple, but it's all the glue and stuff in the projects that's the interesting bits.


Woooooooof

RobDog888
Feb 2nd, 2006, 05:36 PM
Woof! :D

You are a muppet and doing things wrong!

I hope your happy that you got to hear what you wanted to hear. :lol:


Anyways, I'm just learning C# like you but it looks good to me other then the fact that you have a timer in there and need a way to enter in your password. :p

Nice job for 2 days of C# :thumb:

Meooooow!

mendhak
Feb 8th, 2006, 05:32 AM
That's a lot of effort to go through if you're going to perform an .Add() on the objects with the combobox. If you were going to add, you should have simply used User.cs...


private string username = string.Empty;
private string password = string.Empty;

public User()
{
//create blank user class
}

public User(string Username, string Password)
{
username = Username;
password = Password;
}

public string Username
{
get{return username;}
set{username = value;}
}

public string Password
{
get{return password;}
set{password = value;}
}

public override string ToString()
{
return this.Username;
}


Just that part.

But I see what you were trying to do, maybe you should create a datasource that the combobox can bind to.

mendhak
Feb 8th, 2006, 05:32 AM
Also,

You are a muppet and... what RD said.