Click here to Skip to main content
15,887,683 members
Home / Discussions / C#
   

C#

 
QuestionCant Open SQL connection Pin
mcgurdan14-Feb-14 5:51
mcgurdan14-Feb-14 5:51 
AnswerRe: Cant Open SQL connection Pin
Ravi Bhavnani14-Feb-14 6:17
professionalRavi Bhavnani14-Feb-14 6:17 
AnswerRe: Cant Open SQL connection Pin
OriginalGriff14-Feb-14 8:45
mveOriginalGriff14-Feb-14 8:45 
AnswerRe: Cant Open SQL connection Pin
jschell14-Feb-14 10:25
jschell14-Feb-14 10:25 
QuestionHow to create a moving text up in C# 2005 ? Pin
Member 245846714-Feb-14 3:37
Member 245846714-Feb-14 3:37 
QuestionRe: How to create a moving text up in C# 2005 ? Pin
thatraja14-Feb-14 4:10
professionalthatraja14-Feb-14 4:10 
QuestionC# Path Finding Recommendations Pin
Phil_9314-Feb-14 2:57
Phil_9314-Feb-14 2:57 
AnswerRe: C# Path Finding Recommendations Pin
thatraja14-Feb-14 4:03
professionalthatraja14-Feb-14 4:03 
GeneralRe: C# Path Finding Recommendations Pin
Phil_9314-Feb-14 4:09
Phil_9314-Feb-14 4:09 
AnswerRe: C# Path Finding Recommendations Pin
Ravi Bhavnani14-Feb-14 6:18
professionalRavi Bhavnani14-Feb-14 6:18 
AnswerRe: C# Path Finding Recommendations Pin
Eddy Vluggen14-Feb-14 6:29
professionalEddy Vluggen14-Feb-14 6:29 
GeneralRe: C# Path Finding Recommendations Pin
Phil_9314-Feb-14 6:41
Phil_9314-Feb-14 6:41 
Generali want to accept only numeric value to a textbox in datagridview Pin
Ahmed Tamseer14-Feb-14 2:53
Ahmed Tamseer14-Feb-14 2:53 
AnswerRe: i want to accept only numeric value to a textbox in datagridview Pin
thatraja14-Feb-14 4:12
professionalthatraja14-Feb-14 4:12 
GeneralRe: i want to accept only numeric value to a textbox in datagridview Pin
BillWoodruff14-Feb-14 13:54
professionalBillWoodruff14-Feb-14 13:54 
QuestionImpersonation Pin
i gr814-Feb-14 2:17
i gr814-Feb-14 2:17 
QuestionDirtying my hand with regular expression for first time Pin
tasumisra13-Feb-14 18:12
tasumisra13-Feb-14 18:12 
AnswerRe: Dirtying my hand with regular expression for first time Pin
OriginalGriff14-Feb-14 0:01
mveOriginalGriff14-Feb-14 0:01 
GeneralRe: Dirtying my hand with regular expression for first time Pin
tasumisra14-Feb-14 0:25
tasumisra14-Feb-14 0:25 
GeneralRe: Dirtying my hand with regular expression for first time Pin
OriginalGriff14-Feb-14 0:41
mveOriginalGriff14-Feb-14 0:41 
GeneralRe: Dirtying my hand with regular expression for first time Pin
Richard Deeming14-Feb-14 0:43
mveRichard Deeming14-Feb-14 0:43 
AnswerRe: Dirtying my hand with regular expression for first time Pin
tasumisra14-Feb-14 0:53
tasumisra14-Feb-14 0:53 
QuestionConcepts about Generics Pin
Richard Andrew x6413-Feb-14 8:23
professionalRichard Andrew x6413-Feb-14 8:23 
AnswerRe: Concepts about Generics Pin
Richard Deeming13-Feb-14 8:47
mveRichard Deeming13-Feb-14 8:47 
Possibly because they're not quite the same thing.

Key differences between generics and C++ templates:
  • Generics are generic until the types are substituted for them at runtime. Templates are specialized at compile time so they are not still parameterized types at runtime
  • The common language runtime specifically supports generics in MSIL. Because the runtime knows about generics, specific types can be substituted for generic types when referencing an assembly containing a generic type. Templates, in contrast, resolve into ordinary types at compile time and the resulting types may not be specialized in other assemblies.
  • Generics specialized in two different assemblies with the same type arguments are the same type. Templates specialized in two different assemblies with the same type arguments are considered by the runtime to be different types.
  • Generics are generated as a single piece of executable code which is used for all reference type arguments (this is not true for value types, which have a unique implementation per value type). The JIT compiler knows about generics and is able to optimize the code for the reference or value types that are used as type arguments. Templates generate separate runtime code for each specialization.
  • Generics do not allow non-type template parameters, such as template <int i> C {}. Templates allow them.
  • Generics do not allow explicit specialization (that is, a custom implementation of a template for a specific type). Templates do.
  • Generics do not allow partial specialization (a custom implementation for a subset of the type arguments). Templates do.
  • Generics do not allow the type parameter to be used as the base class for the generic type. Templates do.
  • Templates support template-template parameters (e.g. template<template<class T> class X> class MyClass), but generics do not.





"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


GeneralRe: Concepts about Generics Pin
Richard Andrew x6413-Feb-14 8:59
professionalRichard Andrew x6413-Feb-14 8:59 

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.