Quantcast
Channel: Visual Studio and Visual Web Developer Express
Viewing all articles
Browse latest Browse all 3509

value of type integer cannot be converted to 1-dimensional array of integer - error in vb.net

$
0
0

Hello 

in my Vacancy.vb file the method for location datatype is defined as following

    Public Property LocationID() As Integer()
        Get
            Return _locationid
        End Get
        Set(ByVal value As Integer())
            _locationid = value
        End Set
    End Property

In samplevacancy.aspx.vb file I am trying to hardcode the location value

  With Vacancy 
     .LocationID = 5
  End With

But this line shows this error  " value of type integer cannot be converted to 1-dimensional array of integer "

I need to hardcode this value. 

How can I fix this. 

I have to call this Vacancy.vb methods to save this record into database.


Viewing all articles
Browse latest Browse all 3509

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>