CSharpFeeds - All your C# feeds in one place.

Tuesday, December 02, 2008

Testing Private Methods

by Brendan Enrick via Brendan Enrick on 12/2/2008 11:07:19 PM

In a previous post about cutting large classes down in size I mentioned that Sometimes there are methods kept private in a class. Some calculations are kept private because nothing should be calling those methods on this class. This is a good hint that the method belongs somewhere else. If the method is kept private because it doesn't make sense for a user of this class to use it, it belongs somewhere else. Private methods are a common occurrence in classes. Sometimes they should be moved into ...

[ read more ]

Re-throwing exceptions

by via LA.NET [EN] on 12/2/2008 10:33:25 AM

While I was reading the Essential Windows Communication Foundation book (from Addision Wesley), I found the following code (on a transaction required for a WCF service context): [OperationBehavior(TransactionScopeRequired = true,    TransactionAutoComplete = true)] public void Transfer( String from, String to, double amount){   try {     Withdraw(from, amount);     Deposit( to, amount);   }   catch(Exception ex){ &# ...

[ read more ]

Benchmarking, C++, and C# Micro-optimizations

by ericgu via Eric Gunnerson's Compendium : CSharp on 12/2/2008 1:01:57 AM

Two posts (1 2) on C# loop optimization got me thinking recently. Thinking about what I did when I first joined Microsoft. Way back in the spring of 1995 or so (yes, we did have computers back then, but the Internet of the time really *was* just a series of tubes), I was on the C++ compiler test team, and had just picked up the responsibility for running benchmark tests on various C++ compilers. I would run compilation speed and execution speed tests in controlled environments, so that we ...

[ read more ]

Benchmarking, C++, and C# Micro-optimizations

by Eric Gunnerson via Eric Gunnerson's Compendium : CSharp on 12/2/2008 1:01:57 AM

Two posts (1 2) on C# loop optimization got me thinking recently. Thinking about what I did when I first joined Microsoft. Way back in the spring of 1995 or so (yes, we did have computers back then, but the Internet of the time really *was* just a series of tubes), I was on the C++ compiler test team, and had just picked up the responsibility for running benchmark tests on various C++ compilers. I would run compilation speed and execution speed tests in controlled environments, so that we ...

[ read more ]

Subscribe

New Feed

Product Spotlight

Recently Updated Sources

Legal Note

The content of the postings is owned by the respective author. CSharpFeeds is not responsible for the contents of the postings. This site is automatically generated and cannot be reviewed for abusive content. If you find abusive content on CSharpFeeds, please contact us. Designated trademarks and brands are the property of their respective owners. All rights reserved.

Advertise with us