access-modifiers
Class is inaccessible due to its protection level
I have three classes. all are part of the same namespace. here are the basics of the three classes. //FBlock.cs[详细]
2023-01-15 12:46 分类:问答Why can I access a derived private member function via a base class pointer to a derived object?
#include<iostream> using namespace std; class base { public: virtual void add() { cout << \"hi\";[详细]
2023-01-14 02:07 分类:问答Class only writable by "parent" class, but readable by other classes
I\'m using C#, with which I don\'t have a lot of experience (I\'ve mostly worked with java/php/javascript so far)[详细]
2023-01-13 06:57 分类:问答public, protected, private
Take a look at this code: #include <iostream> using namespace std; class A { private: int privatefield;[详细]
2023-01-10 08:45 分类:问答What kind of access modifiers can be applied to a class?
After a little research I\'ve determined that the only access modifiers which you can apply to classes are:[详细]
2023-01-08 18:41 分类:问答When should [assembly: InternalsVisibleTo()] be used?
I understand that the InternalVisibleTo attribute is used to expose types and methods with the internal access modifier to a specified assembly. I have only ever used this for exposing internal method[详细]
2023-01-07 16:46 分类:问答Do access modifiers work for static class functions?
I just came across code that had protected static class functions, as in: class C开发者_如何学Python {[详细]
2023-01-05 21:59 分类:问答accessing protected method in other package?
If 开发者_开发技巧I say class A{ } then it implicitly inherits Object class.So I am having the class as below:[详细]
2023-01-05 17:25 分类:问答PHP5: restrict access to function to certain classes
Is there a way in 开发者_StackOverflow社区PHP5 to only allow a certain class or set of classes to call a particular function? For example, let\'s say I have three classes (\"Foo\", \"Bar\", and \"Baz\[详细]
2023-01-01 22:10 分类:问答C++: Is there a way to limit access to certain methods to certain classes without exposing other private members?
I have a class with a prot开发者_如何转开发ected method Zig::punt() and I only want it to be accessible to the class \"Avocado\". In C++, you\'ll normally do this using the \"friend Avocado\" specifie[详细]
2022-12-31 18:13 分类:问答