Click here to Skip to main content
15,913,055 members
Home / Discussions / C#
   

C#

 
Questionvalue type inheritance Pin
George_George7-May-08 23:10
George_George7-May-08 23:10 
AnswerRe: value type inheritance Pin
Roger Alsing7-May-08 23:59
Roger Alsing7-May-08 23:59 
GeneralRe: value type inheritance Pin
George_George8-May-08 0:04
George_George8-May-08 0:04 
GeneralRe: value type inheritance Pin
CPallini8-May-08 0:40
mveCPallini8-May-08 0:40 
GeneralRe: value type inheritance Pin
George_George8-May-08 3:04
George_George8-May-08 3:04 
GeneralRe: value type inheritance Pin
CPallini8-May-08 3:14
mveCPallini8-May-08 3:14 
GeneralRe: value type inheritance Pin
George_George8-May-08 3:32
George_George8-May-08 3:32 
GeneralRe: value type inheritance Pin
N a v a n e e t h8-May-08 3:41
N a v a n e e t h8-May-08 3:41 
George_George wrote:
Int32 is the same as int, right?


int refer to int32. long refer to int64.

George_George wrote:
Only struct or Enum we defined are derived from ValueType/Enum, primitive types and the related equal types (e.g. Int32 to int do not derive from ValueType/Enum?


Int32 is a built-in value type which don't inherit from System.ValueType. System.ValueType is for programmers to create their own value types other than the built in one. Enum is a special value type which derives from System.Enum not System.ValueType.

George_George wrote:
Value types do not have the overhead associated with storing an instance of a class and they do not require constructors." -- what is the overhead?


Most of the value types are kept in stack along with the values. So it is easy and fast to refer and pass. There is no overhead to clean up the resources. Means garbage collector need not function to clean up value types. It will be cleaned when scope ends.

All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia

How to use google | Ask smart questions

GeneralRe: value type inheritance Pin
George_George8-May-08 3:48
George_George8-May-08 3:48 
GeneralRe: value type inheritance Pin
N a v a n e e t h8-May-08 3:59
N a v a n e e t h8-May-08 3:59 
GeneralRe: value type inheritance Pin
George_George8-May-08 4:17
George_George8-May-08 4:17 
GeneralRe: value type inheritance Pin
N a v a n e e t h8-May-08 4:45
N a v a n e e t h8-May-08 4:45 
GeneralRe: value type inheritance Pin
George_George8-May-08 21:38
George_George8-May-08 21:38 
GeneralRe: value type inheritance Pin
S. Senthil Kumar8-May-08 6:17
S. Senthil Kumar8-May-08 6:17 
GeneralRe: value type inheritance Pin
CPallini8-May-08 4:03
mveCPallini8-May-08 4:03 
GeneralRe: value type inheritance Pin
George_George8-May-08 4:19
George_George8-May-08 4:19 
GeneralRe: value type inheritance Pin
S. Senthil Kumar8-May-08 6:24
S. Senthil Kumar8-May-08 6:24 
GeneralRe: value type inheritance Pin
George_George8-May-08 21:40
George_George8-May-08 21:40 
GeneralRe: value type inheritance Pin
S. Senthil Kumar9-May-08 0:45
S. Senthil Kumar9-May-08 0:45 
GeneralRe: value type inheritance Pin
Roger Alsing8-May-08 0:43
Roger Alsing8-May-08 0:43 
GeneralRe: value type inheritance Pin
George_George8-May-08 3:03
George_George8-May-08 3:03 
GeneralRe: value type inheritance Pin
S. Senthil Kumar8-May-08 6:21
S. Senthil Kumar8-May-08 6:21 
GeneralRe: value type inheritance Pin
George_George8-May-08 21:49
George_George8-May-08 21:49 
GeneralRe: value type inheritance Pin
S. Senthil Kumar9-May-08 0:42
S. Senthil Kumar9-May-08 0:42 
GeneralRe: value type inheritance Pin
George_George10-May-08 21:57
George_George10-May-08 21:57 

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.