473,473 Members | 1,893 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

List. Find. What is wrong with my code?

Hi,

I just created a predicate class following some articles there is an
error.

Could you please, tell me, what might be going on?

1 Public Class FindRowByName
2
3 Private _RowName As String
4 Public Property RowName() As String
5 Get
6 Return _RowName
7 End Get
8 Set(ByVal value As String)
9 _RowName = value
10 End Set
11 End Property ' RowName
12
13 Public Sub New(ByVal rowName As String)
14 Me.RowName = rowName
15 End Sub ' New
16
17 Public Function Search(ByVal row As BoxRows.Row) As Boolean
18 Return String.Compare(row.Name, Me.RowName)
19 End Function ' Search
20
21 End Class ' FindRowByName

I am using it as follows:

1 Dim p As New FindRowByName("Hello")
2 Dim result As Boolean = rows.Find(p.Search)

On line 2 I get the message:

"Argurment not specified for parameter row ..."

But in all examples the parameter is not passed.

Any idea?

Thanks,

Miguel

Mar 13 '07 #1
1 1156
shapper wrote:
Hi,

I just created a predicate class following some articles there is an
error.

Could you please, tell me, what might be going on?

1 Public Class FindRowByName
2
3 Private _RowName As String
4 Public Property RowName() As String
5 Get
6 Return _RowName
7 End Get
8 Set(ByVal value As String)
9 _RowName = value
10 End Set
11 End Property ' RowName
12
13 Public Sub New(ByVal rowName As String)
14 Me.RowName = rowName
15 End Sub ' New
16
17 Public Function Search(ByVal row As BoxRows.Row) As Boolean
18 Return String.Compare(row.Name, Me.RowName)
19 End Function ' Search
20
21 End Class ' FindRowByName

I am using it as follows:

1 Dim p As New FindRowByName("Hello")
2 Dim result As Boolean = rows.Find(p.Search)

On line 2 I get the message:

"Argurment not specified for parameter row ..."

But in all examples the parameter is not passed.

Any idea?

Thanks,

Miguel
What kind of collection is it that you are trying to search in? What is
the type of the rows variable?

--
Göran Andersson
_____
http://www.guffa.com
Mar 13 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: massimo | last post by:
Hey, I wrote this program which should take the numbers entered and sort them out. It doesn¹t matter what order, if decreasing or increasing. I guess I'm confused in the sorting part. Anyone...
4
by: HS-MOON | last post by:
I'm asking you to help me. I'm a beginner of studying c++. I'm trying to make the Singly Linked List(Ordered). Anyway, I've been debugging all day. I can't sort it out!! As you see, I don't...
2
by: Zyron | last post by:
Hello! I'm developing a web page that has a goal of providing personal content, which means that all information should be written in their own language. I'm about to finish my Geo targeting...
5
by: Mark | last post by:
Hi All, Is there a way to (whilst using the sendobject command) use a query as the source of email addresses. I ask this because the list is constanly changing and I don't want to keep going into...
6
by: Dave Hopper | last post by:
Hi I am using the following SQL to retrieve a value in a list box using a unique ID held in the list box call cntID. The list box is used on an order form to list appointments that have been...
19
by: RAJASEKHAR KONDABALA | last post by:
Hi, Does anybody know what the fastest way is to "search for a value in a singly-linked list from its tail" as oposed to its head? I am talking about a non-circular singly-linked list, i.e.,...
26
by: Simon Jefferies | last post by:
Hello, I am trying to add an item to a checked list box, like: clbList.Items.add("Hello",true) I get an error back: Run-time exception thrown: System.ArgumentOutOfRangeException -...
44
by: Josh Mcfarlane | last post by:
Just out of curiosity: When would using std::list be more efficient / effective than using other containers such as vector, deque, etc? As far as I'm aware, list doesn't appear to be...
35
by: Thierry Loiseau | last post by:
Hello all, and Happy end year 2005 ! Well, I would like to obtain a list of all JavaScript var statement, With "for...in" perharps ? That is bellow my recent test here, but the problem is...
4
by: techiepundit | last post by:
I'm a Python newbie who just started learning the language a few weeks ago. So these are beginner questions. I have a list of sockets that I use for select.select calls like this: ...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.