|
||||||
| C# Programming C# (pronounced C-sharp) is a new object oriented language from Microsoft and is derived from C and C++. It also borrows a lot of concepts from Java too including garbage collection. |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
I don't really understand the GET and SET functions inside of a function. The functions go like this:
Code:
int somefunction() {
Get {
return variable;
}
set {
variable = this;
}
}
|
| Sponsored Links |
|
|
|
|||
|
I think you're describing Properties, but the syntax is a bit off. Instead of function someFunction, it'd be property someProperty.
The value in the set is implicit - it's what gets passed when you say object.someProperty = x; (x is the passed value). It's cleaner than Java's getProperty, setProperty IMHO. |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
| John | ........ | 223.00000 |
| dargueta | ........ | 168.00000 |
| Xav | ........ | 164.00000 |
| gaylo565 | ........ | 18.00000 |
| WingedPanther | ........ | 15.00000 |
| |pH| | ........ | 15.00000 |
| Johnnyboy | ........ | 3.00000 |
| navghost | ........ | 1.00000 |
Goal: 100,000 Posts
Complete: 66%