
November 27th, 2012, 11:41 AM
|
|
Registered User
|
|
Join Date: Mar 2006
Posts: 44
Time spent in forums: 17 h 14 m 43 sec
Reputation Power: 0
|
|
|
Making this a public member of the class
I want to make this piece of code a public member of the class but when i do it gives me an exception, the inner exception is:
The method or operation is not implemented
Here is the code i am trying to make public so i do not have to repeat my code over and over again when i want to check my radio buttons to see if any of them have been clicked.
Code:
Dim typeRadioButton As RadioButton = _
typeGroupBox.Controls _
.OfType(Of RadioButton)() _
.Where(Function(r) r.Checked = True) _
.FirstOrDefault()
Then inside one function is this
Code:
If typeRadioButton Is Nothing Then
MessageBox.Show("Type needs to be selected.")
End If
If typeRadioButton.Checked.ToString = True Then
blah blah blah
End if
and then i have it inside my checkout button click event as well and would like to not repeat the code everywhere i need it.
|