I want to create a template class in C #, for example:
public class Foo<T>
where T must inherit from a known class.
I can not find the syntax for this.
Thanks, Malki.
In .NET template class, the term is used instead generic class. And what you are trying to do is called general restrictions :
template class
generic class
public class Foo<T> where T : KnownClass { }
Source: https://habr.com/ru/post/1741566/More articles:How to create a database where the table of basic entities has 25 + columns, but the columns of one object receive an average of <20%? - language-agnosticwriting and reading an arraylist object to and from a file - collectionsjQuery: check oversize font size - jqueryRemove all characters in a multiline string to the given pattern - pythonObject Oriented Measure Metric - oophow to save my name, glasses and levels that play cocos2d - cocos2d-iphonehttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1741568/how-do-you-push-your-commits-to-an-svn-repositor&usg=ALkJrhgImPOrjpEbrgvazwx7MewLCK5GoQDoes the Dalvik file format (* .dx) support more instructions than the Java.class file? - androidIs classOf [] in Scala 2.8 different from 2.7? - scalaHow to determine the user's browser using PHP? - browserAll Articles