N
news.microsoft.com
C# has no default parameters, it uses overloading isntead.
news.microsoft.com said:C# has no default parameters, it uses overloading isntead.
codymanix said:news.microsoft.com said:C# has no default parameters, it uses overloading isntead.
You name isn't really news.microsoft.com, is it?
--
cody
[Freeware, Games and Humor]
www.deutronium.de.vu || www.deutronium.tk
news.microsoft.com said:
messages that are posted in the past, but it seems possibleMichael Culley said:Does anyone know why news server take the poster's date? Servers reject
Thats not true in any manner I've ever seen. I suspect that article wasWilliam Ryan said:According to C# Pro magazine, all the underlying code in VB.NET does when
you use Optional Params is write the overload for you.... I've looked at
the IL and couldn't verify it, but I'm far from an expert in IL.
That's great, only you aren't using the CDO interface.actually news.microsoft.com is the default user for posts via
msdn.microsoft.com web site.
That's great, only you aren't using the CDO interface.
actually news.microsoft.com is the default user for posts via
msdn.microsoft.com web site.
William Ryan said:When I looked at the IL, I did see the option param so I wasn't sure what he
means by "Under the hood" but the inference I got was that ultimately,
that's what's happening (an Option compiles down to an overload). I reread
the article..
http://www.c-sharppro.com/features/2003/10/cs200310jh_f/cs200310jh_f.asp
(It's the last tip)
Here's the two parts that he mentions:
<<Method overloading lets you create multiple interface signatures for the
same method. This feature is not unique to C#. VB .NET also supports it, for
example, by letting you overload class constructors. VB .NET also uses
method overloading under the hood whenever you use the Optional keyword in a
method signature. I'll illustrate with an example. The VB .NET function
InitSqlCommand initializes and returns an ADO.NET SqlCommand object. The
function accepts an OLE DB connection string and optionally accepts a
command timeout value, which defaults to 180 seconds:>>
And :
<<The key issue here is that C# doesn't support the kinds of shortcuts VB
.NET developers are used to. The benefit of the extra work is you get a
better understanding of what the compiler is really doing. How many VB ..NET
developers realize the Optional keyword is a shortcut for method
overloading? In C# you need to know!>>