C# - BODMAS Principle In .NET?

Jan 20, 2012

I discovered today that the .NET framework follows the BODMAS order of operations when doing a calculation. That is calculations are carried out in the following order:

Brackets
Orders
Division
Multiplication
Addition
Subtraction

However I've searched around and can't find any documentation confirming that .NET definitely follows this principle, are there such docs anywhere?

View 3 Replies


ADVERTISEMENT

What Is Principle Behind Not Being Allowed To Hide Member

May 19, 2009

url...If a base class has a members, say a property, that you do not want exposed through the inheriting class then it appears to be not possible (at least with VB.NET) to fully remove the member so that consuming code of the inheriting class has no awareness of that member at all.I know there are ways to make it less prominent or to shadow it so that its functionality or appearance has been altered, but I'm just talking full removal all together.So my questions are:

1)Is my assumption correct (for VB.NET but I'd also like to know which languages do allow for this technique)?

2)(more importantly) What is the driving principle in OOD that supports this restriction?

My guess on question 2 is that inheritance is fundamentally about extensibility rather than the opposite (what is that word anyhow?).I suppose a base class should be protected so that the original intention is not changed so much as to be radically different.At that point one shoudl make a whole new class.But is there a principle behind such reasoning, if true?And is it really a "sin" to want to completely remove only one of a hundred members to essentially tweak the look or feel of that class?I can live with this restriction, but it has peaked my curiosity and I'd like to hear from others on the subject.For the sake of discussion here's a sample class try to make an inheriting class (multiple inheritance is okay too) in which DataSource is notvisible or usable under any condition.[code]

View 8 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved