- [Instructor] So we're back here in Visual Studio,…and this time we're looking at the C sharp code…because what I want to do…is I want to actually create generic type,…and so I'm just going to create a class,…and we'll call this class, oh, I don't know.…We'll call it class foo.…But specifically, class foo…is going to take a type parameter T,…and we're going to say specifically that I want to have…a private field of type T, which we'll call T field,…like so, and we will have a property,…we'll make it a public property…and it'll be of type T, and we'll call it prop.…
And we'll have both a getter and a setter.…And we'll have a method that actually will print out…whatever that particular T field is,…so we'll have public void print it.…Console dot write line…whatever T field happens to be.…And let's have one other here.…So T do nothing with this taking a T.…
We'll take T field, set it to T, and return T field.…All of this is intended simply to give us…a scaffold from which to look at…what this will look like inside of IL.…
Author
Released
9/13/2017- ILDasm and ILasm
- EMAC CLI specifications
- CIL bytecode
- Directives
- Classes
- CIL opcodes and operands
- Stack manipulation
- Exceptions
Skill Level Intermediate
Duration
Views
Related Courses
-
C# & .NET: Programming
with Alexander Zanfir1h 14m Intermediate -
Learning .NET Programming
with Reynald Adolphe1h 36m Intermediate -
Angular2 for .NET Developers
with Reynald Adolphe1h 41m Intermediate
-
Introduction
-
Introduction56s
-
What you should know1m 18s
-
Exercise files59s
-
-
1. ILDasm: The .NET Disassembler
-
Hello world1m 51s
-
ILDasm demo3m 52s
-
-
2. ILasm: The .NET Assembler
-
ILSam introduction1m 23s
-
ILSam demo3m 4s
-
-
3. EMAC CLI Specification
-
EMAC CLI specifications6m 39s
-
-
4. CIL Bytecode
-
CIL bytecode2m 33s
-
-
5. Data Types and Directives
-
Data Types4m 16s
-
Directives2m 31s
-
Directives demo4m 19s
-
-
6. Classes
-
Classes2m 11s
-
Classes demo1m 40s
-
Classes demo extended4m 21s
-
Fields2m 10s
-
-
7. Other Directives
-
Methods5m 43s
-
Methods demo4m 32s
-
Properties1m 39s
-
Properties demo2m 15s
-
-
8. CIL Opcodes and Operands
-
Opcodes operands1m 30s
-
Stack manipulation2m 1s
-
Control flow1m 56s
-
Opcodes operands demo8m 22s
-
Object model3m 20s
-
Exceptions2m 38s
-
-
9. Generics
-
Generics2m 44s
-
Generics demo6m 23s
-
-
10. Using This New-Found Knowledge
-
For each example11m 7s
-
Dynamic example7m 25s
-
Yield return example10m 8s
-
-
Conclusion
-
Summary1m 57s
-
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.
CancelTake notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.
Share this video
Embed this video
Video: Generics demo