@kBessa -
Quote: "You can do that! Just use the "new" keyword, and inside the function yo might call the parent method, like in:
Quote: "public void new Position(float x, float y, float z)
{
//Do whatever you want
base.Position(x,y,z);
}"
The nicest thing about this is that you may decide if you want to do things AFTER the base method, BEFORE the base method, or some before and some after. "
I knew it did it - but I was unawares of the
base.CallOriginalHere thing. THAT is cool. That's how you can do it in FreePascal (probably delphi too) Gives AWESOME fine control of the whole inherited thing
Thanx for that tip!
-----------
@jasuk70 -
Quote: "Quote: "C# is the most "powerful" one in many ways"
Please explain why?
Jas
"
Sure Bro (How ya been? Love your Avatar image - its the best) Um... Basically, its a personal opinion for sure. This is based on strict data types, with the ability to override, syntatic "pleasantries" such as ++BeforeVari, AfterVari++, MyVari+=MoreStuff etc. Things like this I adore.
I'm also fond of the ability to do this (other languages might, but I've only seen it in a few so far that I know for sure):
bool Ok = MyFunction();
Above, the variable "Ok" might be assigned true or false based on "MyFunction".
I could follow it with:
if(Ok){ blah blah};
...I could...
if(Ok==true){ blah blah (notice dual equals in if statement) };
But favorite is:
bool Ok;
if(Ok = MyFunction()){ blah blah };
I just did two different things in one line! That is slick and I use this feature alot:
assignments return the value assigned
(While on the matter - here something - admittedly a slight digress)
One better is FreePascal handles multi-condition statements from left to right and the first fail - STOPS the TESTING!
(single equal here same as C++ and C# dual equal == )
If((1=0) and (2=2)) then
begin
// Note.. the SECOND part of the IF will NOT be tested.
// this allows for some very clever uses for condition statements
//when combined with the "Assignments return the value assigned"
//rule.
end;
anyways, back to point - jsuk70, I haven't played with all the .Net Languages, but frankly the other languages are "twists" of something else - made to be more like C++ (C#?) anyways, and C# for the most part is syntactally similiar to C++ which its modeled after - and C++ always has had a flexible syntax in my opinion.
(I wish Circular references were a thing of the past though - they stink and the possibility for them seems to exist everywhere - and in every language.)
I'm wondering from
Lilith's comment if there is even more things about C# that sorta go with my leaning towards it.
I personally have browsed the other languages and as I was reading I made the decision that C# was the one I'd learn - this is before really knowing C++ like I do now to. I was getting the info from a .Net how to book - I never finish those things - just chapter 1..maybe 2.. enough to learn the verbage - then I'm googling and compiler open and trial by fire LOL)
---------
@Monotonic - Interesting. I( never really thought (ignorance on my part most likely) that Managed C++ was really a .Net language... I knew of Managed C++ - but I thought that verbage meant "You have a .Net Application that uses some C++ Code - therefore its ".Net Managed C++" I never thought it was c++ code translated to CLR somehow. This would imply the CLR can do muliple inheritance maybe? Or does this go back to whay I posted this thread in the first place. .Net Managed C++ can not have multiple Inheritance? If I was CORRECT in my "thoughts" on what managed C++ was... then AHH... I'm confusing myself - but I know what I'm thinknig... to laborus to type it...HELP sopmeone ...finish this for me! LOL (Please Lilith, Another Band-Aid if possible!
)
As for the first Edit and Continue - THAT's HOT - no matter what language! If I could take back things I have said as easily as I can take back some source code (without a full rebuild - mid debug test) I'd be much better off LOL