lect7 - Yin Lou CS 2026, Spring 2010 Assignment 2 is...

Info iconThis preview shows pages 1–9. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Yin Lou CS 2026, Spring 2010 Assignment 2 is released Due this Friday Implement Set<T> and SortedSet<T> ▪ OO features ▪ Generics ▪ Delegates ▪ Enumerator ▪ Operator Overload Delegates Anonymous methods Events Reflection Conversion Explicit and implicit conversions User-defined conversions Exceptions The ability to refer to the type system at run- time Type t = Type.GetType (“System.Int32”); bool b = t.IsSubClassOf(typeof(object)); Construct types from strings Have classes that represent type Can explicitly compare types and determine subclassing (and other) relationships We want to get methods dynamically Type contains about the type All methods, members, properties ..etc Whether or not it is an array All nested types Check out System.Reflection C c = new C(); Type t = c.GetType(); for (int i=0; i<10; i++) { MethodInfo m = t.GetMethod (“m”+ i); m.Invoke(c, null); } System.Reflection.Emit namespace Can dynamically generate CIL code e.g. System.Reflection.Emit.FooMethod Allows the replacement of a body with another How do we get/check type information?...
View Full Document

This document was uploaded on 03/15/2010.

Page1 / 22

lect7 - Yin Lou CS 2026, Spring 2010 Assignment 2 is...

This preview shows document pages 1 - 9. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online