The type for variable 'cri' will not be inferred because it is bound to a field in an enclosing scope. Either change the name of 'cri', of use the fully qualified name (for example, 'Me.cri' or 'MyBase.cri')
I have created a class file with name Predefined which consists of this methods like cricket,BasketBall from this methos im returning List of string type
im calling that class in button click event like the object of class is pre now im calling a method called pre.Cricket(); so when i execute the program with warnings it is raising this error:
'Cricket' is not a member of 'predefined'.
this is the code where it is showing error in line 2:
Dim cric As New List(Of String)()
cric = pre.Cricket()
For cri As Integer = 0 To cric.Count - 1