Click here to Skip to main content
15,894,362 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Connecting Sql Server Pin
SeMartens29-Sep-10 21:23
SeMartens29-Sep-10 21:23 
GeneralRe: Connecting Sql Server Pin
vijaylumar29-Sep-10 22:01
vijaylumar29-Sep-10 22:01 
GeneralRe: Connecting Sql Server Pin
SeMartens29-Sep-10 22:18
SeMartens29-Sep-10 22:18 
AnswerRe: Connecting Sql Server Pin
Gamzun2-Oct-10 1:12
Gamzun2-Oct-10 1:12 
GeneralRe: Connecting Sql Server Pin
vijaylumar2-Oct-10 1:43
vijaylumar2-Oct-10 1:43 
GeneralRe: Connecting Sql Server Pin
Gamzun3-Oct-10 10:20
Gamzun3-Oct-10 10:20 
QuestionInheritance Pin
future383929-Sep-10 4:09
future383929-Sep-10 4:09 
AnswerRe: Inheritance [Longish Post] Pin
Keith Barrow29-Sep-10 21:48
professionalKeith Barrow29-Sep-10 21:48 
First, if you post is long- please say so in the Subject line(like mine), people will down vote you otherwise.
You seem to have grasped the basic idea of inheriting. You should also consider defining Interfaces for your classes, and work with the interface rather than the concrete type.

Your class names are a little confusing (probably just a langauge or typo thing), but it is important for clarity to get these right. People only defines one person so call the class Person simlarly the class Korea should be Korean or KoreanPerson or similar.

Finally, I've a few sytanx suggestion, see the code below:
//You are defining one person: "people" is plural 
public class Person
{
    // This syntax is available in newer versions of the framework:
    // it is neater than the old version, and you do not explictly 
    // declare the fields
    public int Id { get; set; }
    public int Name { get; set; }
    //....... Other Properties similar

    public People(int id, string name, string passportNumber, string nationality) 
    {
        //IMO do not prefix with "this"
        Id = id; //Set the PROPERTY rather than the field - you might have validation in the setter at some point 
        Name = name; 
        //... Others
    } 
    public People() 
    {
        Id = -1
    }
}


GeneralRe: Inheritance [Longish Post] Pin
future383930-Sep-10 4:19
future383930-Sep-10 4:19 
GeneralRe: Inheritance [Longish Post] Pin
Keith Barrow30-Sep-10 9:39
professionalKeith Barrow30-Sep-10 9:39 
QuestionAsp.net Cross Page Post Back issue Pin
AndieDu28-Sep-10 20:44
AndieDu28-Sep-10 20:44 
AnswerRe: Asp.net Cross Page Post Back issue Pin
Not Active29-Sep-10 2:43
mentorNot Active29-Sep-10 2:43 
GeneralRe: Asp.net Cross Page Post Back issue Pin
AndieDu29-Sep-10 13:36
AndieDu29-Sep-10 13:36 
QuestionWhich approach is faster ? calculate Image size in Server or Client ? Pin
Nadia Monalisa28-Sep-10 19:40
Nadia Monalisa28-Sep-10 19:40 
AnswerRe: Which approach is faster ? calculate Image size in Server or Client ? Pin
vaghelabhavesh29-Sep-10 18:08
vaghelabhavesh29-Sep-10 18:08 
GeneralRe: Which approach is faster ? calculate Image size in Server or Client ? Pin
Nadia Monalisa29-Sep-10 19:05
Nadia Monalisa29-Sep-10 19:05 
QuestionAsynchronous webmethods Pin
david vermeulen28-Sep-10 19:19
david vermeulen28-Sep-10 19:19 
AnswerRe: Asynchronous webmethods Pin
Not Active29-Sep-10 2:51
mentorNot Active29-Sep-10 2:51 
AnswerRe: Asynchronous webmethods Pin
NeverHeardOfMe29-Sep-10 3:54
NeverHeardOfMe29-Sep-10 3:54 
QuestionPost via email Pin
Jassim Rahma28-Sep-10 12:35
Jassim Rahma28-Sep-10 12:35 
QuestionNavigationURL question Pin
Jassim Rahma28-Sep-10 12:26
Jassim Rahma28-Sep-10 12:26 
AnswerRe: NavigationURL question Pin
Not Active28-Sep-10 13:49
mentorNot Active28-Sep-10 13:49 
QuestionExpires question Pin
Jassim Rahma28-Sep-10 10:46
Jassim Rahma28-Sep-10 10:46 
AnswerRe: Expires question Pin
thatraja28-Nov-10 1:24
professionalthatraja28-Nov-10 1:24 
Questionabout configuration file Pin
Dhyanga28-Sep-10 5:52
Dhyanga28-Sep-10 5:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.