List Info

Thread: Interview Questions March 2, 2006




Interview Questions March 2, 2006
user name
2006-03-02 15:36:41
Design question:  can you think of any situations where you
would want
to use a private read/write property to wrap a private
member?

Example:

private string fishHead = "";
private string FishHead
{
	get
	{
		return this.fishHead;
	}

	set
	{
		this.fishHead = value;
	}
}

I'm supporting a WinForms project and I notice several
places where a
private member is wrapped like this with no validation or
additional
logic in the getting and setting of the member.  

Any thoughts?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "C# Developers" group.
To post to this group, send email to CSDevelopersgooglegroups.com
To unsubscribe from this group, send email to
CSDevelopers-unsubscribegooglegroups.com
For more options, visit this group at http://gr
oups.google.com/group/CSDevelopers
-~----------~----~----~----~------~----~------~--~---

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )