Vote UpVote

Class Methods vs Instance Methods

The Programming Works – C# implements BigInteger.Parse as a static class method, and there is obvious reason for it: you can call a static class methods in a variable’s declaration: BigInteger N = BigInteger.Parse(stringToParse); Delphi/Pascal does not support the above syntax, so the equivalent code is var N: BigInteger; begin N:= BigInteger.Parse(stringToParse); But now it looks like implementing BigInteger.Parse as a static class method is nothing but additional typing; using an instance method looks better: var N: BigInteger; begin N.Parse(stringToParse); So, what is the right “Delphi ...
Favorite? Off-Topic? Serg @ 2016-04-06 08:44


Visits: 1171
Votes: 1
Favorites: 0
Off-Topic: 1

Visits by Source

User Actions

Users who voted for this posting

Contact us to advertise on DelphiFeeds.com

Community Links

Torry Firebird News


Please login or register to use this functionality.
(click on this box to dismiss)