Click here to Skip to main content
15,889,876 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Prompting user to select point in AutoCad using VB/VB.NET Pin
Tom Deketelaere29-Nov-09 22:47
professionalTom Deketelaere29-Nov-09 22:47 
Questioncreate outlook pst file with vb.net Pin
neverpleat28-Nov-09 11:45
neverpleat28-Nov-09 11:45 
QuestionVB 2005 RANDOM WITH PERCENTAGE Pin
suguimoto28-Nov-09 8:58
suguimoto28-Nov-09 8:58 
AnswerRe: VB 2005 RANDOM WITH PERCENTAGE Pin
Luc Pattyn28-Nov-09 9:34
sitebuilderLuc Pattyn28-Nov-09 9:34 
AnswerRe: VB 2005 RANDOM WITH PERCENTAGE Pin
T210229-Nov-09 0:31
T210229-Nov-09 0:31 
GeneralRe: VB 2005 RANDOM WITH PERCENTAGE Pin
Luc Pattyn29-Nov-09 8:17
sitebuilderLuc Pattyn29-Nov-09 8:17 
GeneralRe: VB 2005 RANDOM WITH PERCENTAGE Pin
T210229-Nov-09 13:10
T210229-Nov-09 13:10 
QuestionTrying to pass a two dimensional array Pin
BobInNJ28-Nov-09 7:26
BobInNJ28-Nov-09 7:26 
I am trying to pass a two dimensional array in Visual Basic. Please consider the following program:
Module Matrix

    Sub printMatrix(ByRef mat(,))
        For i = 0 To 1
            For j = 0 To 1
                Console.Write("{0}", mat(i, j))
            Next j
            Console.WriteLine()
        Next i
    End Sub
    Sub Main()
        Dim mat1(,) As Double = {{1, 2}, {2, 3}}
        Dim mat2(,) As Double = {{1, -2}, {2, 3}}
        Dim mat3(1, 1) As Double
        mat3(0, 0) = 2
        printMatrix(mat1)
    End Sub

End Module


I want to pass the array mat1 to the routine printMatrix. However, when I compile the above code,
I get the following error message:

error BC30333: Value of type '2-dimensional array of Double' cannot be converted to '2-dimensional array of Object' because 'Double' is not a reference type.


I understand that Double is a value type, not a reference type but I would expect to be
able to pass a two dimensional array of Doubles. If I can, please tell me how.

Thanks

Bob
AnswerRe: Trying to pass a two dimensional array Pin
Christian Graus28-Nov-09 7:44
protectorChristian Graus28-Nov-09 7:44 
AnswerRe: Trying to pass a two dimensional array Pin
Dave Kreskowiak28-Nov-09 8:03
mveDave Kreskowiak28-Nov-09 8:03 
GeneralRe: Trying to pass a two dimensional array Pin
BobInNJ28-Nov-09 10:20
BobInNJ28-Nov-09 10:20 
Questionlabel handeling Pin
negar karimi28-Nov-09 6:36
negar karimi28-Nov-09 6:36 
AnswerRe: label handeling Pin
dan!sh 28-Nov-09 6:39
professional dan!sh 28-Nov-09 6:39 
AnswerRe: label handeling Pin
Luc Pattyn28-Nov-09 6:54
sitebuilderLuc Pattyn28-Nov-09 6:54 
QuestionDefault return value? Pin
#realJSOP28-Nov-09 3:23
mve#realJSOP28-Nov-09 3:23 
AnswerRe: Default return value? Pin
Luc Pattyn28-Nov-09 3:34
sitebuilderLuc Pattyn28-Nov-09 3:34 
GeneralRe: Default return value? Pin
#realJSOP28-Nov-09 4:28
mve#realJSOP28-Nov-09 4:28 
GeneralRe: Default return value? Pin
Luc Pattyn28-Nov-09 4:44
sitebuilderLuc Pattyn28-Nov-09 4:44 
GeneralRe: Default return value? Pin
Dave Kreskowiak28-Nov-09 7:59
mveDave Kreskowiak28-Nov-09 7:59 
GeneralRe: Default return value? Pin
Luc Pattyn28-Nov-09 9:37
sitebuilderLuc Pattyn28-Nov-09 9:37 
GeneralRe: Default return value? Pin
David Skelly30-Nov-09 22:50
David Skelly30-Nov-09 22:50 
GeneralRe: Default return value? Pin
Dave Kreskowiak1-Dec-09 15:27
mveDave Kreskowiak1-Dec-09 15:27 
AnswerRe: Default return value? Pin
dan!sh 28-Nov-09 6:13
professional dan!sh 28-Nov-09 6:13 
GeneralRe: Default return value? Pin
Luc Pattyn28-Nov-09 6:56
sitebuilderLuc Pattyn28-Nov-09 6:56 
GeneralRe: Default return value? Pin
Mycroft Holmes28-Nov-09 21:18
professionalMycroft Holmes28-Nov-09 21:18 

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.