Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. adding a property in the class

adding a property in the class

Scheduled Pinned Locked Moved ASP.NET
helpquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    I Never Look Behind
    wrote on last edited by
    #1

    Hi All! in my application, there is a table tblCountries(countryId,countryName) & i have a class: person public class Person { private string name; private int countryID; public string Name { get {return this.name;} set {this.name = value;} } public string CountryId { get {return this.countryID;} set {this.countryID= value;} } } now i want to add an property CountryName which returns name of the country name rather than country . can any one help me in this regards?

    Steve EcholsS 1 Reply Last reply
    0
    • I I Never Look Behind

      Hi All! in my application, there is a table tblCountries(countryId,countryName) & i have a class: person public class Person { private string name; private int countryID; public string Name { get {return this.name;} set {this.name = value;} } public string CountryId { get {return this.countryID;} set {this.countryID= value;} } } now i want to add an property CountryName which returns name of the country name rather than country . can any one help me in this regards?

      Steve EcholsS Offline
      Steve EcholsS Offline
      Steve Echols
      wrote on last edited by
      #2

      Smells like homework, but... Check out DataTable.Select.


      - S 50 cups of coffee and you know it's on!

      • S
        50 cups of coffee and you know it's on!
        Code, follow, or get out of the way.
      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups