Click here to Skip to main content
14,932,329 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: roblem with MySQL 1.0 .NET Connector using VB.NET Window Form Application Pin
Noctris5-Jun-08 12:24
MemberNoctris5-Jun-08 12:24 
GeneralRe: Problem with MySQL 1.0 .NET Connector using VB.NET Window Form Application Pin
drexler_kk5-Jun-08 15:17
Memberdrexler_kk5-Jun-08 15:17 
GeneralRe: Problem with MySQL 1.0 .NET Connector using VB.NET Window Form Application Pin
Noctris10-Jun-08 12:50
MemberNoctris10-Jun-08 12:50 
AnswerRe: roblem with MySQL 1.0 .NET Connector using VB.NET Window Form Application Pin
SteveNY11-Jun-08 5:37
MemberSteveNY11-Jun-08 5:37 
AnswerRe: roblem with MySQL 1.0 .NET Connector using VB.NET Window Form Application Pin
SteveNY11-Jun-08 6:56
MemberSteveNY11-Jun-08 6:56 
Questionscalable picture box Pin
iain65944-Jun-08 23:07
Memberiain65944-Jun-08 23:07 
AnswerRe: scalable picture box Pin
JoeSharp4-Jun-08 23:40
MemberJoeSharp4-Jun-08 23:40 
GeneralRe: scalable picture box Pin
iain65945-Jun-08 4:13
Memberiain65945-Jun-08 4:13 
AnswerRe: scalable picture box Pin
Christian Graus5-Jun-08 4:51
protectorChristian Graus5-Jun-08 4:51 
QuestionHow to set default credentials on Vista using .Net ? Pin
Rizwan Bashir4-Jun-08 22:46
MemberRizwan Bashir4-Jun-08 22:46 
Questioncreate word document with open xml format Pin
zvedu0074-Jun-08 22:21
Memberzvedu0074-Jun-08 22:21 
QuestionPassing Object Arrays as arguments and changing it. Pin
Joakim Nygren4-Jun-08 21:14
MemberJoakim Nygren4-Jun-08 21:14 
AnswerRe: Passing Object Arrays as arguments and changing it. Pin
Johan Hakkesteegt5-Jun-08 3:44
MemberJohan Hakkesteegt5-Jun-08 3:44 
Hi Jocke,

Supposing that you are using vb.net, and not knowing the rest of the code in the function, the error might not point to the objects in your array.

Generally speaking a function will work like so:
Private Function MyStringAlittleShorter(ByVal MyInputString As String, Byval Divider as integer) As String
Return MyInputString.Substring(1, MyInputString.Length / Divider)
End Function

...because I am returning the same type as I declared my function to be (even though one of the Byvals is of a different type).

Now your Byval is an array of type Object, which means that it can contain elements of different types. If you are also trying to return an array, and your function is declared boolean, you would get a type mismatch error. I.e. declare the function to be an array of type object, or perform the logic inside the function, and return a boolean.

Maybe that is the case ?

As for your second question: if the array is of type Object, than you should be able to add new elements of any type. You might get Index out of bounds errors ofcourse.

Hope it helps,

Johan

My advice is free, and you may get what you paid for.

Questionto get reply in child node Pin
Shanmugapriya.G4-Jun-08 20:44
MemberShanmugapriya.G4-Jun-08 20:44 
AnswerRe: to get reply in child node Pin
Ashfield4-Jun-08 21:12
MemberAshfield4-Jun-08 21:12 
QuestionOdbc Connection at the run time Pin
r_mohd4-Jun-08 20:43
Memberr_mohd4-Jun-08 20:43 
AnswerRe: Odbc Connection at the run time Pin
Anubhava Dimri5-Jun-08 21:18
MemberAnubhava Dimri5-Jun-08 21:18 
QuestionControl? Pin
RobertSoelner4-Jun-08 20:16
MemberRobertSoelner4-Jun-08 20:16 
AnswerRe: Control? Pin
Rajesh Anuhya4-Jun-08 20:31
professionalRajesh Anuhya4-Jun-08 20:31 
AnswerRe: Control? Pin
Christian Graus5-Jun-08 4:53
protectorChristian Graus5-Jun-08 4:53 
AnswerRe: Control? Pin
Anubhava Dimri5-Jun-08 21:20
MemberAnubhava Dimri5-Jun-08 21:20 
AnswerRe: Control? Pin
LloydA1117-Jun-08 9:00
MemberLloydA1117-Jun-08 9:00 
Questionhow to? Pin
SSN4-Jun-08 5:35
MemberSSN4-Jun-08 5:35 
AnswerRe: how to? Pin
Christian Graus4-Jun-08 6:05
protectorChristian Graus4-Jun-08 6:05 
AnswerRe: how to? Pin
~V~4-Jun-08 19:38
Member~V~4-Jun-08 19:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.