We're a community of 1077K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,076,386 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

internal and static

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.

3
Contributors
2
Replies
7 Hours
Discussion Span
1 Year Ago
Last Updated
3
Views
surajrai
Newbie Poster
16 posts since May 2010
Reputation Points: 10
Solved Threads: 1
Skill Endorsements: 0

I would suggest you to make method static. The problem is that all the content of them stays in the memory until you close the application.
So use static only if really needed (or for some small methods).

About your question, it would be good to share the code with us, so we can explicitly see whats troubling you.

Mitja Bonca
Posting Maven
2,561 posts since May 2009
Reputation Points: 642
Solved Threads: 486
Skill Endorsements: 13

Static members and methods are instance independent. Internal members and methods are only accessible within the current assembly (similar to protected, but even derived classes outside the assembly cannot access them).

skatamatic
Posting Shark
986 posts since Nov 2007
Reputation Points: 399
Solved Threads: 132
Skill Endorsements: 1

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page rendered in 0.0606 seconds using 2.7MB