473,396 Members | 1,755 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,396 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 1348
"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
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.