[AccessD] Moving to .Net (was Ded Moroz sends you ...)

Heenan, Lambert Lambert.Heenan at chartisinsurance.com
Tue Jan 4 12:27:36 CST 2011


Thanks Mike,

I realized that. Just wanted some clarification from Shamil on what he meant. 

You can also overload operators in C#, just as you can in C++. So you can define a '+' operator for a class to make it do concatenation or addition that makes sense for the class.

BTW my first name is Lambert. :-)


-----Original Message-----
From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Michael Bahr
Sent: Tuesday, January 04, 2011 1:19 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Moving to .Net (was Ded Moroz sends you ...)

Heenan, what you are showing is called overloading.  Same method name but different parameters and return type.  You typically see this with the default constructor being overloaded, for example validating the input values.  The default constructor mearly intializes the private variables to a default value where an overloaded method actually checks if it is vaild and throws exceptions if needed.  Overloading can also occur using inherited methods (from the parent or superclass).

Mike

> When you say that optional parameters are not needed in C# is that 
> because you can just write a new method that has the same name but a 
> different signature?
>
> Long Foo() // this routine takes no parameters Long Foo(Long x) // 
> this routine takes one parameters
>
> ... Etc. etc.
>
> Lambert
>


--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list