Click here to Skip to main content
15,891,607 members
Home / Discussions / C#
   

C#

 
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 
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 
most of the book never explain how memory is allocated for things we use.

i think no memory is allocated for class structure including member function and data member. memory is allocated when we create instance of class.....am i right ?

1) suppose if my class structure is like below one then just tell me how memory will be allocated ?

public class Employee
{
double mydata = 0;
private string _FirstName;

public string FirstName
{
get { return _FirstName; }
set { _FirstName = value ; }
}

private string _LastName;

public string LastName
{
get { return _LastName; }
set { _LastName = value; }
}

public double CalculateValue()
{
return mydata ;
}
}

2) so when i create a instance of employee class then how memory will be allocated for property, data member and member function ?

3) when this line will execute like Employee emp = new Employee(); then how memory will be allocated and also tell me memory will be allocated for which member of that class ?

4) when we call emp.FirstName ="blah" then how memory will be allocated ? and how long data will be stored in memory?

5) any memory is allocated for any interface means IStuden ?

6) we know that for any class instance memory is allocated in heap not stack but i heared that pointer is stored in heap but actual data is stored in stack. so any one can tell me with example how data is stored in heap & stack ? and also in some cases data is only stored in stack.....why ??

7) why one should create static class rather user can declare static method in non-static class and can access those method like

className.MethodName() ? so when and in what kind of scenario user has to create a static class ? is there any advantage of creating

static class ?


i know i have too many question. so i apologized but if possible please give answer in details. thanks
tbhattacharjee

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 
AnswerRe: Any C# library for Forward error correction. Pin
Marco Bertschi25-Mar-13 6:17
protectorMarco Bertschi25-Mar-13 6:17 
AnswerRe: Any C# library for Forward error correction. Pin
unclepaul25-Mar-13 10:44
unclepaul25-Mar-13 10:44 
GeneralRe: Any C# library for Forward error correction. Pin
iamraghusunkara25-Mar-13 19:55
iamraghusunkara25-Mar-13 19:55 
QuestionRemote desktop using VNC Pin
superselector25-Mar-13 1:27
superselector25-Mar-13 1:27 

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.