answersLogoWhite

0


Best Answer

It depends on the context (stand alone, within or outside of a class). Because it is context sensitive, I prefer to declare it the accessibility explicitly to avoid the confusion.

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the default accessibility of a delegate in C sharp.net?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What is a default access specifier for variable in c sharp?

Default access specifier in c# is private. if you don't specify it automaticaly takes it as private.


What is default in switch is C language?

When in the switch none of the case's is true, the code at the default: is executed.


What parameter to a function is one for which an automatic value is supplied if do not explicitly use one in C programming?

You are referring to default arguments. However, C does not support default arguments. That's a C++ feature.


Why Member functions are not virtual by default?

It depends which language you are using. Java member functions are virtual by default but C++ member functions are not. Java takes the viewpoint that if any member function is declared virtual then all member functions should be declared virtual, so they may as well be virtual by default. However, C++ takes the view that a member function should only be declared virtual if there's a specific reason to declare it virtual. Not all functions are meant to be overridden. Indeed, not all classes are meant to act as base classes. So all member functions are non-virtual by default. Purists will argue that the C++ method is the correct method. After all, there's no point in having a virtual-table if it's never going to be used. Java places the onus on the programmer to eliminate an unused virtual-table, whereas C++ simply doesn't provide one unless you explicitly declare one. However, the real reason C++ uses non-virtual methods by default is because it has to maintain compatibility with a C struct. A C struct is not a class so it has no methods (and therefore no virtual methods). It is a "plain-old-data" or POD structure. In C++, however, a struct is a class. As such, by default, it has a compiler-generated default constructor, default copy and move constructors, default copy and move assignment operators and a default destructor. It also has public access by default. However, because the compiler-generated methods are all trivial member-wise implementations, a C++ struct is backwardly compatible with a POD. Thus C code can use a C++ struct just as if it were a C struct, because both use POD structures by default. If C++ used virtual member functions by default, a struct would not be a POD by default, it would be a base class by default.


What is the default access specifier in C plus plus?

private

Related questions

What has the author C C Kissling written?

C. C. Kissling has written: 'Transportation networks, accessibility and urban functions'


The fields in a c program are by default private is true or not?

I guess you mean C++, not C.Data fields of a structure/union are public by default,those of a class are private by default.


What if you declare public members rather than private in c plus plus?

Public members in C++ have accessibility to any function that has scope to the instance of the class, whereas private members have accessibility only to functions of that class.


What are default arguments in c?

Nothing.


What is default value of formal arguments?

In C, there is no default value for formal parameters. In C++, there can be, but the value is whatever you declare in the function declaration.


What is a default access specifier for variable in c sharp?

Default access specifier in c# is private. if you don't specify it automaticaly takes it as private.


What is a hard drive's default letter?

The default identity letter for the internal drive of a computer - is C.


Which is the default parameter passing technique in c plus plus language?

The default is to pass by value.


What is default in switch is C language?

When in the switch none of the case's is true, the code at the default: is executed.


What is the default subnet mask for the IP address 72.224.56.62?

Since this is a Class C address, the default network mask is 255.255.255.0.Since this is a Class C address, the default network mask is 255.255.255.0.Since this is a Class C address, the default network mask is 255.255.255.0.Since this is a Class C address, the default network mask is 255.255.255.0.


What parameter to a function is one for which an automatic value is supplied if do not explicitly use one in C programming?

You are referring to default arguments. However, C does not support default arguments. That's a C++ feature.


What is the default subnet mask of a class A address?

Class A default is 255.0.0.0 Class B default is 255.255.0.0 Class C default is 255.255.255.0