Click here to Skip to main content
15,886,809 members
Home / Discussions / C#
   

C#

 
QuestionSerialization and object versioning Pin
Abyss25-Mar-13 9:39
Abyss25-Mar-13 9:39 
AnswerRe: Serialization and object versioning Pin
Eddy Vluggen25-Mar-13 23:31
professionalEddy Vluggen25-Mar-13 23:31 
QuestionHow to do code optimization in c# apps Pin
Tridip Bhattacharjee25-Mar-13 9:30
professionalTridip Bhattacharjee25-Mar-13 9:30 
GeneralRe: How to do code optimization in c# apps Pin
harold aptroot25-Mar-13 10:41
harold aptroot25-Mar-13 10:41 
AnswerRe: How to do code optimization in c# apps Pin
jschell26-Mar-13 8:39
jschell26-Mar-13 8:39 
QuestionFew question about static class c# Pin
Tridip Bhattacharjee25-Mar-13 5:01
professionalTridip Bhattacharjee25-Mar-13 5:01 
AnswerRe: Few question about static class c# Pin
PIEBALDconsult25-Mar-13 5:14
mvePIEBALDconsult25-Mar-13 5:14 
AnswerRe: Few question about static class c# Pin
Paulo Zemek25-Mar-13 5:39
mvaPaulo Zemek25-Mar-13 5:39 
1) The purpose of a static class is to have only static methods... as I already explained on the other answer, extension methods require static classes, but a static method inside a static class or inside a normal class works the same way.

2) I think you are confusing static classes with value types. All the data on static classes uses normal allocation (heap). Only local variables are kept on the stack. But, as I said on the other answer, an int can be on the heap if it is part of another class, or it can be on the stack if it is a local variable (and actually this is not always true with anonymous delegates, but less forget about it).
A reference type (like a string) is always on the heap. But the "pointer" to such string follows the same principle as an int. So, a local string will have a reference on the stack and the real object on the heap. A string inside another object will have a pointer on the heap (the object which such string) and the string itself also on the heap, but at another place.

modified 25-Mar-13 12:13pm.

GeneralRe: Few question about static class c# Pin
Tridip Bhattacharjee25-Mar-13 8:43
professionalTridip Bhattacharjee25-Mar-13 8:43 
GeneralRe: Few question about static class c# Pin
Paulo Zemek25-Mar-13 9:36
mvaPaulo Zemek25-Mar-13 9:36 
GeneralRe: Few question about static class c# Pin
harold aptroot25-Mar-13 9:50
harold aptroot25-Mar-13 9:50 
AnswerRe: Few question about static class c# Pin
Marco Bertschi25-Mar-13 6:12
protectorMarco Bertschi25-Mar-13 6:12 
GeneralRe: Few question about static class c# Pin
Tridip Bhattacharjee25-Mar-13 8:46
professionalTridip Bhattacharjee25-Mar-13 8:46 
GeneralRe: Few question about static class c# Pin
Marco Bertschi25-Mar-13 9:35
protectorMarco Bertschi25-Mar-13 9:35 
GeneralRe: Few question about static class c# Pin
Tridip Bhattacharjee25-Mar-13 9:53
professionalTridip Bhattacharjee25-Mar-13 9:53 
GeneralRe: Few question about static class c# Pin
Marco Bertschi25-Mar-13 10:16
protectorMarco Bertschi25-Mar-13 10:16 
GeneralRe: Few question about static class c# Pin
Tridip Bhattacharjee25-Mar-13 21:31
professionalTridip Bhattacharjee25-Mar-13 21:31 
GeneralRe: Few question about static class c# Pin
Marco Bertschi25-Mar-13 22:20
protectorMarco Bertschi25-Mar-13 22:20 
AnswerRe: Few question about static class c# Pin
DaveyM6925-Mar-13 9:45
professionalDaveyM6925-Mar-13 9:45 
AnswerRe: Few question about static class c# Pin
V.25-Mar-13 23:04
professionalV.25-Mar-13 23:04 
Questionhow memory is allocated for class, class data member and member function & interface and class instance ? Pin
Tridip Bhattacharjee25-Mar-13 4:59
professionalTridip Bhattacharjee25-Mar-13 4:59 
AnswerRe: how memory is allocated for class, class data member and member function & interface and class instance ? Pin
Paulo Zemek25-Mar-13 5:28
mvaPaulo Zemek25-Mar-13 5:28 
GeneralRe: how memory is allocated for class, class data member and member function & interface and class instance ? Pin
Tridip Bhattacharjee25-Mar-13 9:26
professionalTridip Bhattacharjee25-Mar-13 9:26 
GeneralRe: how memory is allocated for class, class data member and member function & interface and class instance ? Pin
Paulo Zemek25-Mar-13 9:46
mvaPaulo Zemek25-Mar-13 9:46 
QuestionAny C# library for Forward error correction. Pin
iamraghusunkara25-Mar-13 4:33
iamraghusunkara25-Mar-13 4:33 

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.