How does c# generics and c++ templates compare?



How does c# generics and c++ templates compare?..

Answer / Areena Asraf

Although both C# Generics and C++ Templates allow for type parameters, there are some differences. Generics in C# provide stronger type safety at compile time as they can enforce the type restrictions you specify, whereas C++ Templates generate code at compile time for each specific type, potentially leading to less efficient execution.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Sharp Interview Questions

What is deferred execution?

1 Answers  


What is the use of ispostback in c#?

1 Answers  


can we create an empty interface with no definitions? If so, how it should be called in the class?

3 Answers   IBM,


What is an escape sequence?

1 Answers  


How do I do implement a trace?

1 Answers  


What is expression c#?

1 Answers  


what is the use of master pages. how to use it

2 Answers  


If dll and exe files are same it means you can deploy both the files in gac?

1 Answers  


What are the types of access modifiers?

1 Answers  


What is a three-tier application.

1 Answers   Siebel,


What is the use of private constructor in c#?

1 Answers  


If multiple interfaces are inherited and they have conflicting method names; What will happen ?

1 Answers   Siebel,


Categories