Author: Ry99 | Posted on: 8/15/2008 6:47:06 PM | Views : 946

I have a class with a function that will return an object if the object's property is matched with a value passed in, but if there is no matching value I want it to return null.  Basically like this:
    Public Function getSelected() As directoryItem
        For Each item As directoryItem In _itemArr
            If item.isSelected() Then
                Return item
            End If
        Next

        ' HERE is where I want to return null if there are no matches

    End Function

I know I can just leave it blank but Visual Web Developer gives a warning saying not all code paths result in a ...

Go to the complete details ...