0
votes
Vote UpVote

Ensure you know the state of an instance.

The Wiert Corner – A while ago, I came across a class having (among other members) two methods named like this: Start Stop Within one of the other members of the class, I had to (temporarily) Stop processing, then Start it again. But I couldn’t, as neither Start, nor Stop would make a record of the state it left the instance in. Always ensure you know the state of an instance. So I added the state, and tests to ensure a Stop/Start change was indeed not breaking things. –jeroenFiled under: .NET, .NET 1.x, .NET 2.0, .NET 3.0, .NET 3.5, .NET 4.0, .NET 4.5, C#, C# 1.0, C# 2.0, C# 3.0, C# 4.0, C# 5.0, ...
Favorite? Off-Topic? jpluimers @ 2015-11-24 06:00

Statistics

Visits: 1144
Votes: 0
Favorites: 0
Off-Topic: 0

Visits by Source

User Actions

Users who voted for this posting

Subscribe:
Contact us to advertise on DelphiFeeds.com

Community Links

Torry Firebird News

Sponsor

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