Re: Hiding the public members of a class without modifying the CLASS

Tech-Archive recommends: Fix windows errors by optimizing your registry



Hi sachin thanks for ur reply,

But if I create the instance of the base class I can use all the 10 methods
it has to be restricted .If I have created the instance of this base class
or any sub classes derived from this dllclass it will not allow u to use all
the methods

If u have any idea plz get back to my mail

Thanks in advance

BR




"Sachin Saki" <SachinSaki@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:3C7E6078-E246-4ED9-B63F-14D5DED69812@xxxxxxxxxxxxxxxx
> Hi,
>
> Once you declare the methods identifier as PUBLIC they will accessible to
> everywhere.
>
> I think what you are trying to do is not possible by this implementation.
> you can achieve this by explosing another class if it can be inherited by
> that DLL. In this class make methods public you want to explose and make
> other methods private that you don't want to explose to user and then give
> that DLL to user.
>
> Regards,
> Sachin Saki
> .NET Developer, Capgemini - INDIA
>
> "Brahmam" ?? ????:
>
>> HI,
>>
>> Suppose i have the requirement that i want to hide the pubilc
>> members
>> of a class without modifying the code inside the class
>>
>> Example :
>> class A
>> {
>> public foo1();
>> public foo2();
>> public foo3();
>> public foo4();
>> public foo5();
>> public foo6();
>> public foo7();
>> public foo8();
>> public foo9();
>> public foo10();
>> }
>>
>> I made this class as a DLL and i have given this DLL to the user. Now the
>> requirement is, For the user only 7 public methods has to be exposed and
>> the
>> remaining 3 has not , for that what to do , I am not allowed to change
>> the
>> code inside the class (But , i can implement this class), can anyone give
>> me
>> the solution for this.
>>
>> Thanks in advance,
>> BR.
>>
>>
>>
>>
>>


.



Relevant Pages

  • Re: Best practices for application wide subs
    ... out under a bit of load to see how each one performs. ... Normally I'd suggest putting app-wide subs into the DLL, ... base class and then override Page_Load in subsequent classes. ... In a common .DLL? ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Something strange (?) with abstract base class
    ... Are you saying that you have a base class that is not exposed, ... say CBase, and several derived classes, say CDer1, CDer2, etc. They're ... none of these classes, or anything inside them, is exported in the DLL ... Then I have the exe, ...
    (microsoft.public.vc.mfc)
  • Re: Is this a viable design idea?
    ... The base class is indeed just an interface and the 'real' external ... DLLs implement that interface. ... The way I have designed it now (with circular reference), ... >2) Your Order object is used BY your external dll, ...
    (microsoft.public.dotnet.general)
  • DLL version conflicts
    ... Therefore I have created a base class in C++ that every object is ... In order to access the DLL I get the address of a function that returns ... For a few weeks now I am using as a new compiler the Visual Studio.NET ... any kind of application compiled with any version of Visual Studio? ...
    (microsoft.public.dotnet.general)