answersLogoWhite

0

What are Constraints in Generics?

Updated: 8/19/2019
User Avatar

GurunathaDogi

Lvl 1
13y ago

Best Answer

· Constraints are represented in C# using the where keyword

· Constraints is something restriction the way doing that in generics

· There are 3 types of Constraints

1. Constructor constraint

2. Derivation constraint

3. Reference / value type constraints

LEarn Design Pattern,C#,ASP.NET,LINQ,Sharepoint,WCF,WPF,WWF

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What are Constraints in Generics?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Where to you use generics in c?

C doesn't have generics, that's C++.


What does APO mean in a prescription?

"APO" is the prefix for the generics manifactured by Apotex.


What are generics in c?

The System.Collections.Generics namespace contains the generics collections. Generics can be a method, class, structure, or an interface to which it acts upon Generics can be refer to a method ,class, structure or an interface in a type - safe manner Generics provide the ability to create type-safe collections in .NET. Generics.Net is a well organized class which contains data structures, algorithms, design patterns and other utilities in generic form. Generics are used to make the code more reusable. Generics can act like any data type means there is no need to write any internal code. LEarn Design Pattern,C#,ASP.NET,LINQ,Sharepoint,WCF,WPF,WWF


Which antihistamine makes you sleepy?

Newer antihistamines that do not cause drowsiness or pass the blood-brain barrier.include the following: loratidine(Claritin.cetirizine(Zyrtec).fexofenadine(Allegra).Desloratadine(Clarinex).Seldane(terfenadine).was.withdrawn from the market


The constraints on the management of change?

The constraints on the management of change?


What is a criteria and constraints.?

Your criteria is(goals) and constraints are(limits).


What are the common constraints to any project and why are they called constraints?

Common constraints in a project include time, cost, scope, and quality. They are called constraints because they limit the project's flexibility and resources. Effectively managing constraints is critical to the success of a project.


What constraints did you face when making these decisions?

I face the constraints of money.


How is geometric constraints different from numeric constraints?

ask roman


Definition of technological constraints in media?

technological constraints of mechanization


What do you mean by referral integrity constraints?

What do you mean by referral integrity constraints


What is data consistency constraints?

Data consistency constraints are rules that define the allowable values and relationships within a database to ensure that the data remains accurate and reliable. These constraints help maintain the quality and integrity of the data by preventing conflicting or incorrect information from being stored. Examples include primary key constraints, foreign key constraints, and unique constraints.