Are c# generics the same as c++ templates?



Are c# generics the same as c++ templates?..

Answer / Swati Passi

While C++ templates and C# generics share a similar concept, there are differences between them. C++ templates are fully realized at compile-time, while C# generics are realized at runtime. This difference leads to different behavior in some cases.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Sharp Interview Questions

how can i get this 123456789 1234 6789 123 789 12 89 1 9

1 Answers   Excel,


How many types of variables are there in c#?

1 Answers  


In a C# class we have a SortedList member m_addinProjects we want to provide an iterator to allow the consumer of this class access to the items in the collection. Please provide an iterator method for the AnalyzeAddinsDLL class below and an example of how it would be used. namespace AnalyzeAddinsDLL { public class AllAddInProjects { private SortedList<string, AddInProject> m_addinProjects; public AllAddInProjects() { m_addinProjects = new SortedList<string, AddInProject>(); } } }

1 Answers   ABC, WinsIndia,


What is the wildcard character in SQL? Let?s say you want to query database with LIKE for all employees whose name starts with La.

1 Answers  


Is c# a strongly-typed language?

1 Answers  


What do u mean by delegation?

1 Answers  


What is the best method to fill the GridView. using SqlDataReader or Dataset and why

5 Answers   CA,


I want to single value if you give any integer value. Below are examples  1. Input: 123  Output: 6 2. Input: 99   9+9=18   1+8  Output: 9 How to get above output?

1 Answers   AxSys,


What is event sourcing in c#?

1 Answers  


What is action in c# 3.5?

1 Answers  


What are c# collections?

1 Answers  


List down the reason behind the usage of c# language.

1 Answers  


Categories