CS0449 Error Compiler
Mensagem de erro
Restrição 'Classe' ou 'struct' deve vir antes de qualquer Outro restrição
The Constraints on the parâmetro tipo of a tipo genérico or método must ocorrer in a specific ordem: class or struct must be if present, Primeiro, then any Constraints interface, and finally any Constraints construtor.This Error is Caused By the class or not appearing Primeiro restrição struct.To resolver this Error, reorganizar the clauses restrição.
Exemplo
The seguinte exemplo generates CS0449.
// CS0449.cs
// compile with: /target:library
interface I {}
public class C4
{
public void F1<T>() where T : class, struct, I {} // CS0449
public void F2<T>() where T : I, struct {} // CS0449
public void F3<T>() where T : I, class {} // CS0449
// OK
public void F4<T>() where T : class {}
public void F5<T>() where T : struct {}
public void F6<T>() where T : I {}
}