Page 45 - CSharp/C#
P. 45

PowerOf calculation                                                                              763

        Chapter 129: Reflection                                                                             765


          Introduction                                                                                       765

          Remarks                                                                                            765

          Examples                                                                                           765

            Get a System.Type                                                                                765

            Get the members of a type                                                                        765
            Get a method and invoke it                                                                       766

            Getting and setting properties                                                                   767

            Custom Attributes                                                                                767

            Looping through all the properties of a class                                                    769

            Determining generic arguments of instances of generic types                                      769

            Get a generic method and invoke it                                                               770

            Create an instance of a Generic Type and invoke it's method                                      771

            Instantiating classes that implement an interface (e.g. plugin activation)                       771

            Creating an instance of a Type                                                                   771
          With Activator class                                                                               772

          Without Activator class                                                                            772

            Get a Type by name with namespace                                                                775

            Get a Strongly-Typed Delegate to a Method or Property via Reflection                             776

        Chapter 130: Regex Parsing                                                                          777


          Syntax                                                                                             777
          Parameters                                                                                         777


          Remarks                                                                                            777

          Examples                                                                                           778

            Single match                                                                                     778
            Multiple matches                                                                                 778


        Chapter 131: Runtime Compile                                                                        779

          Examples                                                                                           779

            RoslynScript                                                                                     779

            CSharpCodeProvider                                                                               779

        Chapter 132: Singleton Implementation                                                               780
   40   41   42   43   44   45   46   47   48   49   50