S
Sunburned Surveyor
I'm a Java developer in the process of writing a class library in C#,
so please bear with me.
I'm trying to write a method that can return a generic Object OR a
Decimal value. In Java I would just have the method return an Object,
since all Java primitive data types have Object wrappers like Integer
and Double.
If I have a method signature that returns Object in C#, can I return a
Decimal value within the method body? I was looking online at it
appears that Decimal is a Struct, not a Class, so I'm not sure if this
is legal.
Thanks for help with the solution.
The Sunburned Surveyor
so please bear with me.
I'm trying to write a method that can return a generic Object OR a
Decimal value. In Java I would just have the method return an Object,
since all Java primitive data types have Object wrappers like Integer
and Double.
If I have a method signature that returns Object in C#, can I return a
Decimal value within the method body? I was looking online at it
appears that Decimal is a Struct, not a Class, so I'm not sure if this
is legal.
Thanks for help with the solution.
The Sunburned Surveyor