473,394 Members | 1,703 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,394 software developers and data experts.

Difference between public and protected class?

1
I've just started with C#, I know this is a forum for C++ and C but they are alot like eachother so I'll just have to hope they are the same on this. I couldn't really find a C# section.

I just wanted to know was the difference between public and protected class? and when I should use public or protected. And final question is when I only write Class; not, protected or public. What is it then, does it automaticly assume I mean one of them, or is it neither one of them?
Apr 9 '07 #1
1 1216
sicarie
4,677 Expert Mod 4TB
Well, what do you think the difference is, based on their names? I don't know if C# uses packages or not (as Java does), or friend classes (like C++), or something entirely different.

As for the automatic assumption on a non-declared class, I have no idea. This is a question for the .NET people, as that's rather specific to the Microsoft implementation of C# (and as such, I'm moving this to the .NET forum).
Apr 9 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Daniel Aarno | last post by:
Can anyone provide a good explanation to why the following does not work? After all since A is a public base of B objects of type B ISA object of type A. class A { protected: void foo() {} };...
13
by: Adam H. Peterson | last post by:
I just made an observation and I wondered if it's generally known (or if I'm missing something). My observation is that static protected members are essentially useless, only a hint to the user. ...
5
by: Chris | last post by:
Hi, I don't get the difference between a struct and a class ! ok, I know that a struct is a value type, the other a reference type, I understand the technical differences between both, but...
3
by: lbolognini | last post by:
Hi everybody, sorry for the newbie question but I can't get the difference between these two code snippets. Is it that one is a delegate (the first) and that while the first ADDS behaviour the...
12
by: Nathan Sokalski | last post by:
What is the difference between the Page_Init and Page_Load events? When I was debugging my code, they both seemed to get triggered on every postback. I am assuming that there is some difference,...
1
by: Shadow Lynx | last post by:
If this is not the most appropriate group for this question, please let me know. I noticed an odd priority difference in resolving names in VS 2005 (VWD Express) vs. the .NET 2.0 compiler (the...
8
by: Jordan | last post by:
AFAIK there are two ways to expose members of a base class to a derived or child class: 1. declare the members public in the base class 2. declare them as 'protected' in the base class Is...
8
by: pigeonrandle | last post by:
Hi, Please pity me, i am on a dial-up connection for the first time in 5 years :( ! Does anyone know how the resulting Graphics objects differ ...? What i really mean is can someone explain it...
1
by: robparr | last post by:
Hello, hopefully someone can help me. I am reading and learning steadily about threading and asynchronous programming, which to me sound like the same thing. At the moment I am not sure what the...
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: 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
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.