F

f1 virtual function, 118 f2 virtual function, 118 f3 virtual function, 118

Fail static helper function, 45

_fastcall calling convention, 207

FCL (Framework Class Library), 11, 251 Field attribute (AttributeTargets enumeration), 68 Fieldlnfo class, 63, 66, 68 fields, 85, 130

FileDumper class, 113-115, 135

automatic disposal of fields and, 130 defining custom component classes, 108 disposed objects and, 133 FileLoadException, 150 FileName property, 105, 108 FileStream class, 133, 268 FileStream field, 130 FileSystemWatcher class, 190, 197 finalization, 124, 257-274

asynchronous exceptions and, 269-274 graph promotion problem and, 266 prioritizing, 268 timing problem and, 260-266 when to implement, 259 Finalize method, 257 finalizers, 124, 257 FlagsAttribute class, 78 for each construct, 101 foreign keys, 59

formatter implementations, 70 Framework Class Library (FCL), 11, 251 friend assemblies, 74 FullName property, 52 /FU compiler switch, 32, 74 function pointers, 108, 217 function-try blocks, 118, 242

GAC (global assembly cache), 56 GACUtil.exe tool, 57 garbage collection, 15

finalization timing problem and, 260 last-chance cleanup and, 257 metadata and, 31 objects and, 123 root references and, 262 value type arrays and, 76 garbage-collected heap, 15

gcnew operator, 15

gcroot template, 190-196

generic code, dynamic type instantiation and, 61 Generic namespace, 100 generic thunks, 226 generics, 100 get accessor method, 98 Get prefix, 60, 63, 67 GetCustomAttributes method, 69 GetExecutingAssembly method, 52 GetField method, 63 GetFields method, 63, 66 GetFile function, 137, 139 GetHashCode method, 12 Getlnterface function, 291 GetLastError API, 40 GetLastError-caching, 226-231 GetResponse method, 43 GetType method, 12, 60 GetTypes method, 60 GetValue method, 64 GetWrappedObject method, 247 global assembly cache (GAC), 56 global functions, 109 global variables, initialization of, 296 /Gm compiler switch, 156 graph promotion problem, finalization and, 266

graphs of objects, 261 Grunkemeyer, Brian, 273

Handle property, 267, 270 has-a relationships, 98-102 HashTable class, 100, 196 header files, 31, 34, 74 Hello, world program, 1 helper functions, for debugging, 45 HRESULT values, 40 HttpWebRequest, 44

¡Comparable interface, 94 ICryptoTransform interface, 251 ICustomAttributeProvider interface, 68 IDbCommand interface, 98 IDbConnection interface, 98 identity concepts, 34 IDisposable interface, 124-128, 134, 257 IEnumerable interface, 101 IL Assembler (ILASM.EXE), initonly fields and, 85 ILDASM, 50

immutability of interfaces, 96

implicit optimizations, native-to-managed transitions and, 208 implicit overriding, 91 implicitly dereferenced variables, 128 #import extension, 31 inheritance, 88-94 native types and, 248 private/protected, 89 public, 90 value types and, 76 initialization timing problems, 298-302 Initialize method, 77 InitializeComponent method, 103, 114 initonly field, 85, 86 inlined thunks, 225 installing assemblies into GAC, 57 int integer type, 174 Int32 value type, 174 IntelliSense, metadata and, 52 interface class, 73 interfaces immutability of, 96 inheritance and, 88 naming conventions and, 82 numerical suffixes and, 97 overriding, 94 interior pointers, 27, 183, 187 InterlockedExchangePointer, 256 internal visibility modifier, 79 interoperability, 6-9, 143, 203, 235 CTS and, 11, 14 language, 11, 235

interoperability metadata, 205 interoperability vtables, 206 InteropServices namespace, 239, 275 IntPtr structure, 238, 247 IntPtr value type, 177 InvalidCastException class, 23, 79 Invoke method, 110 is operator (C#), 44 is-a relationships, 89 IsDefined method, 68 ISerializable interface, 69 IServiceProvider interface, 35

Was this article helpful?

0 0

Post a comment