Fulqrum Publishing Home   |   Register   |   Today Posts   |   Members   |   UserCP   |   Calendar   |   Search   |   FAQ

Go Back   Official Fulqrum Publishing forum > Fulqrum Publishing > IL-2 Sturmovik: Cliffs of Dover > FMB, Mission & Campaign builder Discussions

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #26  
Old 09-27-2011, 06:42 PM
FG28_Kodiak FG28_Kodiak is offline
Approved Member
 
Join Date: Dec 2009
Location: Swabia->Bavaria->Germany
Posts: 884
Default

simply said get; and set; are short versions for class design.

example:

public class test()
{
public string Name {get; set;}
}

so you can use:
test newobject = new test();

newobject.Name = "test1"; // this is the set
string test2 = newobject.Name; // this is the get


the long version

public class test()
{
private string name;

public void SetName (string newname)
{
name = newname;
}

public string GetName ()
{
return name;
}
}
so you must use:
test newobject = new test();

newobject.SetName("test1");
string test2 = newobject.GetName();

only a simple example.
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:20 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.