0

With the following code, the debugger keeps telling me "Too many arguments to 'Public Sub New()'. " What needs to be done w/ it?

' create new object and store into Client array
         clients(count) = New Client(firstName(count), _
            lastName(count), account(count), _
            balance(count))

Also, it's letting me know that an "Overload resolution failed because no accessible 'Show' can be called with these arguments:" -then gives me a huge list. Here's the code it's yelling at:

Public Property First() As String
      Get
         Return firstValue
      End Get
      Set(ByVal value As String)
         If (value = "") Then
            MessageBox.Show("Please enter a first name.", MessageBoxButtons.OK, _
               MessageBoxIcon.Information)
         End If
      End Set
   End Property

What do I need to do in order to get a message box to pop up without coding it like this?

2
Contributors
2
Replies
3
Views
9 Years
Discussion Span
Last Post by kahaj
0

You have to supply a caption to the Messagebox

MessageBox.Show("Please enter a first name.", "Your Caption", MessageBoxButtons.OK, MessageBoxIcon.Information)

Show your code for Client class.

0

Alright, don't know why I hadn't caught that. It's all working just fine now. Thanks so much!

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.