473,407 Members | 2,314 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

polymorph methods

Hi,

I have two methods, with the same name but different params:

MyMethod(string)
MyMethod(string, string, string)

I can build the service but the call in IE or a client app fails,
because of the same method name. Isn't it possible to use the same
methode name multiple?

TIA, Frank
Nov 23 '05 #1
2 1349
"Frank Jeseit" <bu*********@gmx.de> wrote in news:uW$Mc32aFHA.3488
@tk2msftngp13.phx.gbl:
I have two methods, with the same name but different params:

MyMethod(string)
MyMethod(string, string, string)
First of all, this is not a polymorph. I believe you dont quite understand
what a polymorph is.

This is whats called an overload.
I can build the service but the call in IE or a client app fails,
because of the same method name. Isn't it possible to use the same
methode name multiple?


Overloads are not allowed in a webservice because AFAIK SOAP does not
support them but requires a unique name.

Use
MyMethod(string)
MyMethod2(string, string, string)

Or some other name - Im not fond of using 2, 3, etc, I just posted it for
example.


--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"

Blog: http://blogs.atozed.com/kudzu
Nov 23 '05 #2
"Frank Jeseit" <bu*********@gmx.de> wrote in news:uW$Mc32aFHA.3488
@tk2msftngp13.phx.gbl:
I have two methods, with the same name but different params:

MyMethod(string)
MyMethod(string, string, string)
First of all, this is not a polymorph. I believe you dont quite understand
what a polymorph is.

This is whats called an overload.
I can build the service but the call in IE or a client app fails,
because of the same method name. Isn't it possible to use the same
methode name multiple?


Overloads are not allowed in a webservice because AFAIK SOAP does not
support them but requires a unique name.

Use
MyMethod(string)
MyMethod2(string, string, string)

Or some other name - Im not fond of using 2, 3, etc, I just posted it for
example.


--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"

Blog: http://blogs.atozed.com/kudzu
Nov 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

99
by: David MacQuigg | last post by:
I'm not getting any feedback on the most important benefit in my proposed "Ideas for Python 3" thread - the unification of methods and functions. Perhaps it was buried among too many other less...
9
by: Mika Vainio | last post by:
hi everybody, i'm working on the following problem: i need to build a 26-nary tree to save a data dictionary. every letter of the words is represented by a cell (cell has a pointer-vector cell*...
32
by: Adrian Herscu | last post by:
Hi all, In which circumstances it is appropriate to declare methods as non-virtual? Thanx, Adrian.
2
by: Mark | last post by:
I have it in my head that I saw a marketing document from Microsoft with the total number of classes and methods in the .NET Framework. Something like 70,000 methods? I don't need precise numbers,...
5
by: Genboy | last post by:
My "VIS" Website, which is a C# site created in VS.NET, Framework 1.1, is no longer compiling for me via the command line. As I have done 600 times in the last year and a half, I can compile to...
0
by: Frank Jeseit | last post by:
Hi, I have two methods, with the same name but different params: MyMethod(string) MyMethod(string, string, string) I can build the service but the call in IE or a client app fails, because...
4
by: marcus hall | last post by:
I am considering a strategy for implementation of a finite state machine. What I would like to do is to use derived classes to represent the state of the machine, so the vtable pointer is the state...
2
by: Fred | last post by:
I've got the following code: #include <iostream> class Base{ private: virtual void f(int) { std::cout << "f in Base" << std::endl; } };
1
by: MindWrapper | last post by:
boost serialization of polymorph classes from DLLs Folks, Let's consider following code -------------------------------- // base.h // abstract base class class IBase {
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.