hi,
I have two class say class A and class B.
Now the methods in class B are used only by class A. When I checked class B, I found that few methods are static and few methods are internal.
Can you sugest me is it fine ? Or since I already have an public instance of Class B in class A so I can remove the static modifier and make it internal.
Is there any performance related issues ?
Thanks.
SenthilkumarPosted Mar 7, 2012, 12:02 AM
VulpesPosted Mar 6, 2012, 8:52 AM
Jignesh TrivediPosted Mar 6, 2012, 8:13 AM
internal is for assembly scope (i.e. only accessible from code in the same .exe or .dll) and instance method of the class.
If you project really need then it fine. what is objective behind this?
As per suggetion make static class and all methods are static and internal methods are internal static.
Static class members can be used to separate data and behavior that is independent of any object identity.
The advantage of using a static class is that the compiler can check to make sure that no instance members are added by user.
this just suggetion.
hope this help.