i want to declare an abstract method, just formality since i can declare them with the same name in inherit classes without declaring the abstract in parent, anyway, the problem is that according to subclass type, it must receive different parameters. in both cases they are enum values, but different types of enums for each subclass. i can not declare a 'void' parameter, i dont know if i can declare for example a casting in a declaration, like:
in parent
abstract something(int someparam)
in subclass
something ((int) enumtype someparam)
is this possible

declaring abstract method that receives different parameters
*Elad*
First I must repeats the others' statement that your design is not of much use, but nevertheless, this should work:
abstract class Aparams {}
abstract class A
{
abstract int something (Aparams p);
}
class B: A
{
int something (Aparams p)
{
BParams bp = p as Bparams;
// uses bp.e here
}
}
class C: A
{
int something (Aparams p)
{ /* as above */}
}
class Bparams :Aparams
{
public BEnum e;
}
class Cparams :Aparams
{
public CEnum e;
}
Isaac Brock
I didn't understand very well your question but I guess that you're asking if you can cast the enum types to int's and the answer is yes, you can cast enum types to int.
TheMaj0r
So what's the point of having the method in the base class If the methods in the derived classes take different parameters you can't take advantage of polymorphism anyway.
pradeep990