Click here to Skip to main content
15,921,577 members
Home / Discussions / C#
   

C#

 
AnswerRe: sqlite error in c# program Pin
loyal ginger28-Feb-11 3:54
loyal ginger28-Feb-11 3:54 
AnswerRe: sqlite error in c# program Pin
jschell28-Feb-11 8:23
jschell28-Feb-11 8:23 
QuestionHow to use progress bar according to the code execution timing. Pin
sr15928-Feb-11 2:08
sr15928-Feb-11 2:08 
AnswerRe: How to use progress bar according to the code execution timing. Pin
Ankur\m/28-Feb-11 2:20
professionalAnkur\m/28-Feb-11 2:20 
GeneralRe: How to use progress bar according to the code execution timing. Pin
Pete O'Hanlon28-Feb-11 2:30
mvePete O'Hanlon28-Feb-11 2:30 
GeneralRe: How to use progress bar according to the code execution timing. Pin
Ankur\m/28-Feb-11 2:53
professionalAnkur\m/28-Feb-11 2:53 
AnswerRe: How to use progress bar according to the code execution timing. Pin
coolestCoder28-Feb-11 2:21
coolestCoder28-Feb-11 2:21 
AnswerRe: How to use progress bar according to the code execution timing. Pin
Pete O'Hanlon28-Feb-11 2:26
mvePete O'Hanlon28-Feb-11 2:26 
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 

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.