Click here to Skip to main content
12,818,508 members (34,331 online)
Click here to Skip to main content
Add your own
alternative version


136 bookmarked
Posted 1 Mar 2005

How to Test Private and Protected methods in .NET

, 1 Mar 2005
Rate this:
Please Sign up or sign in to vote.
This article explains some theory behind testing/not testing private methods, and then provides and walks through a downloadable code sample to demonstrate these testing techniques.


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Web Developer
United States United States
Tim Stall is a Chicago-based technical consultant for Computer Sciences Corporation (, a leading global IT services company. In addition to his expertise in Microsoft.Net development projects and enterprise architecture, Tim's .Net experience includes, writing technical publications, leading internal training, and having MCAD certification. His blog is at

You may also be interested in...


Comments and Discussions

GeneralRe: What about private constructors? Pin
N Blumhardt28-Dec-05 15:43
memberN Blumhardt28-Dec-05 15:43 
GeneralSome interesting ideas Pin
Colin Angus Mackay2-Mar-05 1:02
memberColin Angus Mackay2-Mar-05 1:02 
GeneralRe: Some interesting ideas Pin
TimStall2-Mar-05 11:16
memberTimStall2-Mar-05 11:16 
GeneralRe: Some interesting ideas Pin
Colin Angus Mackay3-Mar-05 1:11
memberColin Angus Mackay3-Mar-05 1:11 
GeneralRe: Some interesting ideas Pin
TimStall7-Mar-05 6:35
memberTimStall7-Mar-05 6:35 
GeneralRe: Some interesting ideas Pin
Colin Angus Mackay7-Mar-05 7:28
memberColin Angus Mackay7-Mar-05 7:28 
GeneralRe: Some interesting ideas Pin
TimStall7-Mar-05 19:18
memberTimStall7-Mar-05 19:18 
GeneralRe: Some interesting ideas Pin
Colin Angus Mackay8-Mar-05 7:03
memberColin Angus Mackay8-Mar-05 7:03 
GeneralProtected methods Pin
Mark Focas1-Mar-05 15:16
memberMark Focas1-Mar-05 15:16 
GeneralRe: Protected methods Pin
TimStall2-Mar-05 11:15
memberTimStall2-Mar-05 11:15 
GeneralRe: Protected methods Pin
Richard Gavel21-Apr-05 7:24
sussRichard Gavel21-Apr-05 7:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.170308.1 | Last Updated 1 Mar 2005
Article Copyright 2005 by TimStall
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid