473,387 Members | 1,722 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Text from a book that I don't understand

Hello!

I'm reading a book called Visual C# 2005 and there one thing here that you
might be able to answer.

public class MyClass
{
// Class member
}
Here is the text that I don't understand what they mean. It says "Note that
classes declared in their own right in this way
cannot be private or protected." what do they mean by that ?

//Tony
Jun 27 '08 #1
4 1077
Hello!

I was to fast to sent the question.
When I come to think about the question I found the answer myself.

//Tony
"Tony" <jo*****************@telia.comskrev i meddelandet
news:O3**************@TK2MSFTNGP05.phx.gbl...
Hello!

I'm reading a book called Visual C# 2005 and there one thing here that you
might be able to answer.

public class MyClass
{
// Class member
}
Here is the text that I don't understand what they mean. It says "Note
that
classes declared in their own right in this way
cannot be private or protected." what do they mean by that ?

//Tony


Jun 27 '08 #2
Maybe you should include the answer in your follow up post, in case there is
someone reading that doesn't know :-)
Jun 27 '08 #3
My understanding is that you can't declare a class private or
protected because private would mean that nothing could use it outside
of itself and thus it would be a useless class. Protected would say
that this class can only be used by another class that inherits from
it, but if its protected nothing can inherit from it also making it a
useless class.

Jun 27 '08 #4
On Wed, 04 Jun 2008 10:13:36 -0700, cfps.Christian <ge*******@otc.edu>
wrote:
My understanding is that you can't declare a class private or
protected because private would mean that nothing could use it outside
of itself and thus it would be a useless class. Protected would say
that this class can only be used by another class that inherits from
it, but if its protected nothing can inherit from it also making it a
useless class.
But none of that is really true.

Whether it even pertains to Tony's question I don't know...his original
question was vague and lacking the context needed to really understand
what the book was saying.

But nested classes can in fact be protected or private and those access
modifiers in that context can in fact be useful.

Pete
Jun 27 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Ralph Freshour | last post by:
I bought the PHP and MySQL For Dummies book and I'm having trouble understanding how I use PHP to verify and check forms input text data - the book shows snippets of code so I know how to do the...
7
by: tada991 | last post by:
Hello Everyone, I just purchased Visual Studio .Net Architect 2003 and want to know what's a good book for begginers to start with. I know nothing about programming whatsoever, but I do have a...
1
by: Tony Johansson | last post by:
Hello! I'm reading a book about C++ and there is something that I don't understand so I ask you. I have marked the section from the book that is of intertest by tagging it with BOOK START HERE...
32
by: Ed Jay | last post by:
A complete js newbie is asking this question: I have a form comprised of several questions, each answered with a radio button. I'd like to use onClick to bring up additional text at the end of...
4
by: http://www.visual-basic-data-mining.net/forum | last post by:
Besides using For Each /Next loop to find every individual nodes, which loop should be use and how to apply if i want only one set of tag...(in blue) Example: <Book> <Title ID ="1">...
0
by: JosAH | last post by:
Greetings, Introduction At the end of the last Compiler article part I stated that I wanted to write about text processing. I had no idea what exactly to talk about; until my wife commanded...
0
by: JosAH | last post by:
Greetings, Introduction Last week I started thinking about a text processing facility. I already found a substantial amount of text: a King James version of the bible. I'm going to use that...
0
by: JosAH | last post by:
Greetings, the last two article parts described the design and implementation of the text Processor which spoonfeeds paragraphs of text to the LibraryBuilder. The latter object organizes, cleans...
0
by: JosAH | last post by:
Greetings, welcome back; above we discussed the peripherals of the Library class: loading and saving such an instantiation of it, the BookMark interface and then some. This part of the article...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.