Click here to Skip to main content
16,005,037 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
AnswerRe: creating pocket pc programs using visual studio .net 2002? Pin
Matt Philmon4-Dec-03 7:39
Matt Philmon4-Dec-03 7:39 
QuestionAccessing Remote Objects from the Server? Pin
GrzegorzKowalski197930-Nov-03 8:59
GrzegorzKowalski197930-Nov-03 8:59 
QuestionCan't using System.Runtime.Remoting.Channels.Tcp . Why? Pin
redchilde28-Nov-03 19:09
redchilde28-Nov-03 19:09 
GeneralDirectoryEntry Class Constructor Pin
thilol28-Nov-03 4:23
thilol28-Nov-03 4:23 
GeneralInstallUtilLib.dll: Unknown error in CorBindToRuntimeHost Pin
solidstore27-Nov-03 0:14
solidstore27-Nov-03 0:14 
QuestionHow Managed C++ client connect to https url Pin
Cristina Rodriguez Garcia26-Nov-03 21:53
Cristina Rodriguez Garcia26-Nov-03 21:53 
QuestionByRef still doubling the overhead of ByVal? Pin
Toni Danza26-Nov-03 13:30
Toni Danza26-Nov-03 13:30 
AnswerRe: ByRef still doubling the overhead of ByVal? Pin
Colin Angus Mackay26-Nov-03 13:52
Colin Angus Mackay26-Nov-03 13:52 
I'm guessing that ByRef is the VB.NET equivalent to the C# ref keyword. If this is true, then:

Okay. First - Nothing gets copied. What happens is that a pointer to the object is passed in to the method. The method can then manipulate the object (through the reference/pointer). This means that when the method returns the caller's object that was passed into the method is now changed.

Sorry, but my example is in C#
static void Main()
{
    Int32 i = 10;
    Console.WriteLine(i);
    Method(ref i);
    Console.WriteLine(i);
}

static void Method(ref j)
{
    j += 10;
}


The output would be:
10
20


If the parameter was passed normally (with out the ref) the result would be:
10
10


I hope this help.

If you want a good book that covers this then I recommend "Applied Microsoft .NET Framework Programming" by Jeffrey Richter.

Regards,
Colin.

--Colin Mackay--

"In the confrontation between the stream and the rock, the stream always wins - not through strength but perseverance." (H. Jackson Brown)


GeneralRe: ByRef still doubling the overhead of ByVal? Pin
Toni Danza26-Nov-03 15:12
Toni Danza26-Nov-03 15:12 
GeneralRe: ByRef still doubling the overhead of ByVal? Pin
Philip Fitzsimons27-Nov-03 2:58
Philip Fitzsimons27-Nov-03 2:58 
GeneralRe: ByRef still doubling the overhead of ByVal? Pin
Toni Danza27-Nov-03 3:52
Toni Danza27-Nov-03 3:52 
GeneralRe: ByRef still doubling the overhead of ByVal? Pin
Philip Fitzsimons27-Nov-03 4:00
Philip Fitzsimons27-Nov-03 4:00 
GeneralPaper source for printing Pin
Quango626-Nov-03 0:19
Quango626-Nov-03 0:19 
GeneralRe: Paper source for printing Pin
Duncan Edwards Jones26-Nov-03 0:52
professionalDuncan Edwards Jones26-Nov-03 0:52 
GeneralNaming Conventions - Forms Pin
O c t a v i e25-Nov-03 22:30
O c t a v i e25-Nov-03 22:30 
GeneralRe: Naming Conventions - Forms Pin
Paul Watson25-Nov-03 22:45
sitebuilderPaul Watson25-Nov-03 22:45 
Generaloracleconnection.BeginTransaction Pin
yu-yu24-Nov-03 20:42
yu-yu24-Nov-03 20:42 
QuestionWhy does "DoEvents()" reset Current.Cursor? Pin
Noodnik24-Nov-03 10:21
Noodnik24-Nov-03 10:21 
GeneralDataSet -> SoapSerializationData Pin
ODS24-Nov-03 6:12
ODS24-Nov-03 6:12 
GeneralModifying SOAP client request Pin
Anonymous24-Nov-03 5:50
Anonymous24-Nov-03 5:50 
QuestionUpdate dotNET framework ? Pin
thaivs1118123-Nov-03 21:25
thaivs1118123-Nov-03 21:25 
AnswerRe: Update dotNET framework ? Pin
Paul Watson24-Nov-03 5:55
sitebuilderPaul Watson24-Nov-03 5:55 
AnswerRe: Update dotNET framework ? Pin
Matt Philmon4-Dec-03 7:38
Matt Philmon4-Dec-03 7:38 
GeneralVB.Net Pin
MonsterHilux23-Nov-03 19:56
MonsterHilux23-Nov-03 19:56 
GeneralRe: VB.Net Pin
Colin Angus Mackay26-Nov-03 12:57
Colin Angus Mackay26-Nov-03 12:57 

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.