Wrox Programmer Forums
|
C# 4.0 aka C# 2010 General Discussion Discussions about the C# 4.0, C# 4, Visual C# 2010 language and tool not related to any specific Wrox book
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# 4.0 aka C# 2010 General Discussion section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 6th, 2012, 03:46 AM
Authorized User
 
Join Date: Sep 2012
Posts: 29
Thanks: 14
Thanked 0 Times in 0 Posts
Default nested class utility

There are often situations in which i saw the use of nested classes .
While many say they are not needed.
In this question I would like to ask you when do we use a nested class
 
Old September 6th, 2012, 06:00 AM
Wrox Author
 
Join Date: Sep 2010
Posts: 175
Thanks: 3
Thanked 53 Times in 53 Posts
Default

if the nested class is only useful with the outer class.
In case the nested class is not public, it can only be used from within the outer class.
In the Professional C# book, in the Transactions-chapter you can see a Transaction<T> class with a nested ResourceManager. The resource manager is not accessible from the outside, and is used by the transaction type.
__________________
Christian
CN innovation
Visit my blog at: csharp.christiannagel.com
Follow me on twitter: @christiannagel
The Following User Says Thank You to ChristianNagel For This Useful Post:
amigo1 (September 7th, 2012)
 
Old September 7th, 2012, 02:56 AM
Authorized User
 
Join Date: Sep 2012
Posts: 29
Thanks: 14
Thanked 0 Times in 0 Posts
Default thank you teacher

Thank you very much.
It really helped me.
All the books-- I mean editions, contain too many useful materials.
for example the 2005 versions had a very good primer in oops.
In the 2008 book there was probably a more comprehensive coverage of the Array chapter.
Many novice programmers feel that apart from the usual "Professional C# 4" a bigger version of THIS VERY / or say C#5/6/...etc book should also come up
I am trying to go through each of them -- but I don't know when I will complete
regards
amigo1





Similar Threads
Thread Thread Starter Forum Replies Last Post
how to make nested array of class NickJG Java Basics 2 February 23rd, 2012 10:50 AM
Cool utility Yurko SQL Server 2000 3 December 2nd, 2005 11:03 AM
Aspnet_regiis utility ak ASP.NET 1.0 and 1.1 Basics 1 March 5th, 2004 01:17 PM
vb utility kumarpa Pro VB 6 1 March 5th, 2004 10:40 AM
Bcp utility jejyjose SQL Server 2000 1 October 16th, 2003 08:31 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.