|
||||||
| 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 |
|
|||
|
Code:
int somefunction() {
Get {
return variable;
}
set {
variable = this;
}
}
|
|
|||
|
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 | |
|
|
Algorithms and Data Structures
Programming Language Popularity
Code Collaboration
Podnet IRC Network
AmpHosted
Goal #1: 1,000 Blogs
Goal #2: 1,000 Wiki Pages
Goal #3: 300,000 Posts
Goal #4: 20,000 Threads
Done: 30%, 23%, 55%, 75%