/ Forside / Teknologi / Udvikling / VB/Basic / Nyhedsindlæg
Login
Glemt dit kodeord?
Brugernavn

Kodeord


Reklame
Top 10 brugere
VB/Basic
#NavnPoint
berpox 2425
pete 1435
CADmageren 1251
gibson 1230
Phylock 887
gandalf 836
AntonV 790
strarup 750
Benjamin... 700
10  tom.kise 610
What happens, when the object-type get con~
Fra : leerstring


Dato : 07-02-06 12:51

My starting position:
I have a recursive function, which analyses the meta-structure of a
xml-document.
So far the (recursive) function has a parameter of the object-type
instead of an specified type!

Well, to cut a long story short:
What happens, when a 'object'-type-parameter (as object) is identified
(at runtime) as a concrete type?

An simple example:

Private Sub Form_Load()
Dim recset As ADODB.Recordset
...
' Wich of the two functions is faster?? And why?
Call function1(recset) ' Calls with As Object
Call function2(recset) ' Calls with As ADODB.Recordset
End Sub

Public Function function1(obj As Object)
' make something
End Function

Public Function function2(obj As ADODB.Recordset)
' make the same something as function1
End Function

Is it faster to write the specific type???
And why is it faster???
What happens internal???


thanx in advance...
Leerstring


 
 
Søg
Reklame
Statistik
Spørgsmål : 177558
Tips : 31968
Nyheder : 719565
Indlæg : 6408914
Brugere : 218888

Månedens bedste
Årets bedste
Sidste års bedste