Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 07-01-2011
Member
 
Join Date: Dec 2010
Posts: 53
What are Smart fields in programming language

Hello friends , I am so glad to post my question my once again , last time I had posted my question regarding a technical query and now I am posting to ask about some programming concepts, I have been doing a bit C# programming in Microsoft's Visual Studio. I want to ask about the smart fields that are been used in the object oriented language but mostly in C# language , if you have any idea please let me know , I am waiting for your response.
Reply With Quote
  #2  
Old 07-01-2011
Member
 
Join Date: May 2009
Posts: 620
Re: What are Smart fields in programming language

It is always a better objective to plan classes that not only conceal the implementation of the class?s function, but that also prohibit any straight member right to use to the class?s fields. By giving accessor methods whose work it is to get back and assign the values of these fields, you can be certain that a field is treated properly, so you can use this setter and getter properties and use it effectively. .
Reply With Quote
  #3  
Old 07-01-2011
Member
 
Join Date: May 2009
Posts: 525
Re: What are Smart fields in programming language

Using accessor function function well and is a method utilized by developers of several object-oriented languages, that also involves C++ and Java. However, C# gives an even richer means?properties?that has the similar abilities as accessor function and is much more stylish on the client end. Through properties, a developer can write a client that can control a class?s fields considering those fields as public fields .
Reply With Quote
  #4  
Old 07-01-2011
Member
 
Join Date: May 2009
Posts: 523
Re: What are Smart fields in programming language

Using accessor function function well and is a method utilized by developers of several object-oriented languages, that also involves C++ and Java. However, C# gives an even richer means?properties?that has the similar abilities as accessor function and is much more stylish on the client end. Through properties, a developer can write a client that can control a class?s fields considering those fields as public fields .
Reply With Quote
  #5  
Old 07-01-2011
Member
 
Join Date: Apr 2009
Posts: 484
Re: What are Smart fields in programming language

A C# property comprise of a field declaration and accessor function mainly utilized to change the field?s value. These accessor functions are called getter and setter functions. The former is used to retrieve the value and the latter is used to modify the content. Here is the example
Code:
class Location 
    {
        protected string area;
        protected string postalzip;

        public string ZipCode
        {
            get
            {
                return postalzip;
            }
            set
            {
                                postalzip = value;
                // the area is updated.
            }
        }
    }
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "What are Smart fields in programming language"
Thread Thread Starter Forum Replies Last Post
Most popular programming language SoftWore Polls & Voting 12 14-08-2010 09:42 AM
What are HTA in Programming Language? Silent~Kid Software Development 4 27-02-2010 05:31 AM
Socket programming: Is any new Programming Language? Kushan Software Development 3 14-11-2009 11:13 AM
JABACO programming language Duck Software Development 4 22-04-2009 09:21 PM
Best Programming Language To Learn First? Baker Software Development 4 02-04-2009 12:11 AM


All times are GMT +5.5. The time now is 05:31 AM.