Click here to Skip to main content
15,905,148 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to use progress bar according to the code execution timing. Pin
GenJerDan28-Feb-11 3:46
GenJerDan28-Feb-11 3:46 
GeneralRe: How to use progress bar according to the code execution timing. Pin
Pete O'Hanlon28-Feb-11 4:18
mvePete O'Hanlon28-Feb-11 4:18 
GeneralRe: How to use progress bar according to the code execution timing. Pin
GenJerDan28-Feb-11 4:25
GenJerDan28-Feb-11 4:25 
AnswerRe: How to use progress bar according to the code execution timing. Pin
Luc Pattyn28-Feb-11 2:27
sitebuilderLuc Pattyn28-Feb-11 2:27 
AnswerRe: How to use progress bar according to the code execution timing. Pin
_Erik_28-Feb-11 5:01
_Erik_28-Feb-11 5:01 
AnswerRe: How to use progress bar according to the code execution timing. Pin
RaviRanjanKr28-Feb-11 17:20
professionalRaviRanjanKr28-Feb-11 17:20 
QuestionStatic Method Pin
anishkannan28-Feb-11 1:06
anishkannan28-Feb-11 1:06 
AnswerRe: Static Method Pin
Keith Barrow28-Feb-11 1:32
professionalKeith Barrow28-Feb-11 1:32 
anishkannan wrote:
Please help me whats is happening exactly

All this means is that the method isn't accessing any instance members of the class (non-static fields/properties/methods). If you aren't accessing instance members and you are, say, passing in variables to your method the variables *might* be better expressed as fields or properties, improving the class design.


anishkannan wrote:
But what i feel, if we are using static in more methods , its will go apart from the object
so memory its maintain all time even any request not comes. and if may access N number of user , Entire user request is try to using these same block of code( memory ). So may be happened performence issue . Or need to synchronize this code.


Marking the method can (not does) result in a measurable performance gain (see http://msdn.microsoft.com/en-us/library/ms245046.aspx[^]). It doesn't make it any less part of the class, it just decouples it from instances. If you think making the methods static will worsen performance or the static methods aren't semantically correct for your object, then you can suppress the warning perfectly safely:

#pragma warning disable 1822
public void Foo()
{
}


for individual warnings or add /nowarn:1822 to the compiler options. Personally I'd go for the individual warning unless it becomes a huge hassle.

GeneralRe: Static Method Pin
anishkannan28-Feb-11 2:08
anishkannan28-Feb-11 2:08 
AnswerRe: Static Method Pin
OriginalGriff28-Feb-11 2:51
mveOriginalGriff28-Feb-11 2:51 
AnswerRe: Static Method Pin
OriginalGriff28-Feb-11 1:36
mveOriginalGriff28-Feb-11 1:36 
GeneralRe: Static Method Pin
Keith Barrow28-Feb-11 2:58
professionalKeith Barrow28-Feb-11 2:58 
QuestionSAX Parser Pin
NarVish28-Feb-11 0:20
NarVish28-Feb-11 0:20 
AnswerRe: SAX Parser Pin
Yusuf28-Feb-11 0:46
Yusuf28-Feb-11 0:46 
GeneralRe: SAX Parser Pin
NarVish28-Feb-11 0:55
NarVish28-Feb-11 0:55 
QuestionHow can I block an http request? Pin
rahul.kulshreshtha27-Feb-11 23:43
rahul.kulshreshtha27-Feb-11 23:43 
AnswerRe: How can I block an http request? Pin
Tony Richards28-Feb-11 0:01
Tony Richards28-Feb-11 0:01 
GeneralRe: How can I block an http request? Pin
rahul.kulshreshtha1-Mar-11 23:13
rahul.kulshreshtha1-Mar-11 23:13 
AnswerRe: How can I block an http request? Pin
rahul.kulshreshtha1-Mar-11 23:16
rahul.kulshreshtha1-Mar-11 23:16 
QuestionIs there a cute way to do this - sort of challenge Pin
Mycroft Holmes27-Feb-11 21:45
professionalMycroft Holmes27-Feb-11 21:45 
AnswerRe: Is there a cute way to do this - sort of challenge Pin
Dalek Dave27-Feb-11 22:47
professionalDalek Dave27-Feb-11 22:47 
AnswerRe: Is there a cute way to do this - sort of challenge Pin
Keith Barrow27-Feb-11 22:52
professionalKeith Barrow27-Feb-11 22:52 
GeneralRe: Is there a cute way to do this - sort of challenge Pin
Mycroft Holmes27-Feb-11 23:56
professionalMycroft Holmes27-Feb-11 23:56 
GeneralRe: Is there a cute way to do this - sort of challenge Pin
Keith Barrow28-Feb-11 0:31
professionalKeith Barrow28-Feb-11 0:31 
AnswerRe: Is there a cute way to do this - sort of challenge Pin
OriginalGriff27-Feb-11 23:14
mveOriginalGriff27-Feb-11 23:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.