Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
No Overload takes 5 arguments
Message
From
23/09/2013 06:23:57
 
 
To
22/09/2013 05:30:32
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
C# 4.0
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01583574
Message ID:
01583860
Views:
26
>On an afterthought
>
>>>And if you use 'ref' you are forced to instantiate the objects before the call otherwise it won't compile ; 'out' avoids that....
>
>Nowhere is it written that you have to instantiate the objects before the call - only that they have to be initialized
>
>A null value is ok
>
>	static class Test_RefOut
>	{
>		internal static void Go()
>		{
>			Dictionary<string, string> dict = null;
>
>			int x = GetDictByRef(ref dict);
>
>			Console.WriteLine("result : {0}", dict);
>		}
>
>		static int  GetDictByRef(ref Dictionary<string, string> dict)
>		{
>			//dict = new Dictionary<string, string>();
>			return 2;
>		}
>		
>	}
>
True. OK - back to message 1583810:
" value types : depending on the size of the value type "

What if the parameter is a biggish structure. More bytes to pass there. e.g.
 public struct LotsOfDoubles
    {
        public double a, b, c, d, e, f, g, h, i, j;
    }
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform