c# - cant figure out how to create a get set statement -


i try make get set statement doesn't work. have no idea why. have form named form1 contains combo-box names , button.

the button opens new form form2 has text box. want able add text in text box combo box in form1. searched web bit , found in order need create get , set statement instead of playing privacy of controls.

the set , get statement doesn't work. says assignment call increment decrement , new object can used statement.

much appreciate help.

public string guidenamefunc(){     { return guidename.text; }     set { guidename.text = value; } } 

just remove () code.

public string guidenamefunc{     { return guidename.text; }     set { guidename.text = value; } } 

Comments

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -