Đang tải... (xem toàn văn)
Ngày đăng: 11/07/2018, 16:59
Xem thêm: 1321 visual c 2010 recipes , 1-1. Create a Console Application from the Command Line, 1-2. Create a Windows-Based Application from the Command Line, 1-4. Create and Use a Code Library from the Command Line, 1-6. Include Code Selectively at Build Time, 1-10. Verify That a Strongly Named Assembly Has Not Been Modified, 1-16. Manipulate the Appearance of the Console, 1-20. Define an Automatically Implemented Property, 1-24. Implement a Custom Indexer, 2-2. Encode a String Using Alternate Character Encoding, 2-4. Base64 Encode Binary Data, 2-5. Validate Input Using Regular Expressions, 2-8. Add, Subtract, and Compare Dates and Times, 2-12. Create a Generic Type, 2-13. Store a Serializable Object to a File, 2-14. Serialize an Object Using JSON, 2-15. Read User Input from the Console, 2-17. Select Collection or Array Elements, 2-18. Remove Duplicate Items from an Array or Collection, 3-2. Create Types That Can Be Passed Across Application Domain Boundaries, 3-5. Load an Assembly into the Current Application Domain, 3-7. Instantiate a Type in a Different Application Domain, 3-8. Pass Data Between Application Domains, 3-9. Unload Assemblies and Application Domains, 3-12. Instantiate an Object Using Reflection, 3-13. Create a Custom Attribute, 3-15. Programmatically Discover the Members of a Type, 3-18. Create a Custom Dynamic Type, 4-1. Execute a Method Using the Thread Pool, 4-2. Execute a Method Asynchronously, 4-3. Execute a Method Periodically, 4-6. Execute a Method Using a New Thread, 4-7. Synchronize the Execution of Multiple Threads Using a Monitor, 4-8. Synchronize the Execution of Multiple Threads Using an Event, 4-9. Synchronize the Execution of Multiple Threads Using a Mutex, 4-11. Synchronize Access to a Shared Data Value, 4-15. Start a New Process, 4-17. Ensure That Only One Instance of an Application Can Execute Concurrently, 5-1. Retrieve Information About a File, Directory, or Drive, 5-3. Copy, Move, or Delete a File or Directory, 5-6. Show a Just-in-Time Directory Tree in the TreeView Control, 5-9. Read a File Asynchronously, 5-18. Use an Isolated Store, 5-22. Manipulate the Access Control List of a File or Directory, 5-25. Process a Log File, 6-1. Show the Structure of an XML Document in a TreeView, 6-3. Quickly Append Nodes in an XML Document, 6-6. Find Elements with an XPath Search, 6-7. Read and Write XML Without Loading an Entire Document into Memory, 6-8. Validate an XML Document Against a Schema, 6-9. Use XML Serialization with Custom Objects, 6-12. Perform an XSL Transform, 6-15. Query XML with LINQ, 6-16. Modify an XML Tree with LINQ, 7-2. Store Data with a Control, 7-4. Track the Visible Forms in an Application, 7-5. Find All MDI Child Forms, 7-6. Save Configuration Settings for a Form, 7-8. Restrict a Text Box to Accept Only Specific Input, 7-9. Use an Autocomplete Combo Box or Text Box, 7-10. Sort a List View by Any Column, 7-13. Make a Multilingual Form, 7-15. Make a Borderless Form Movable, 7-17. Validate an Input Control, 7-18. Use a Drag-and-Drop Operation, 7-20. Display a Web Page in a Windows-Based Application, 7-21. Display WPF Windows in a Windows Forms Application, 7-22. Display WPF Controls in Windows Forms, 8-2. Perform Hit Testing with Shapes, 8-3. Create an Irregularly Shaped Control, 8-4. Create a Movable Sprite, 8-7. Use Double Buffering to Increase Redraw Speed, 8-11. Play a Sound File, 8-13. Retrieve Information About Installed Printers, 8-14. Print a Simple Document, 8-15. Print a Multipage Document, 8-17. Show a Dynamic Print Preview, 8-20. Recognize Characters in an Image (OCR), 9-1. Connect to a Database, 9-4. Store a Database Connection String Securely, 9-5. Execute a SQL Command or Stored Procedure, 9-6. Use Parameters in a SQL Command or Stored Procedure, 9-7. Process the Results of a SQL Query Using a Data Reader, 9-8. Obtain an XML Document from a SQL Server Query, 9-9. Perform Asynchronous Database Operations Against SQL Server, 9-12. Create an In-Memory Cache, 9-14. Perform a LINQ Query, 9-16. Compare LINQ DataSet Results, 10-1. Obtain Information About the Local Network Interface, 10-3. Download Data over HTTP or FTP, 10-5. Respond to HTTP Requests from Within Your Application, 10-7. Send E-mail Using SMTP, 10-8. Resolve a Host Name to an IP Address, 10-9. Ping an IP Address, 10-11. Create a Multithreaded TCP Server That Supports Asynchronous Communications, 10-13. Create a SOAP-Based Web Service, 10-15. Process the Content of an Atom or RSS Feed, 11-1. Allow Partially Trusted Code to Use Your Strongly Named Assembly, 11-4. Ensure the Runtime Grants Specific Permissions to Your Assembly, 11-6. View the Permissions Required by an Assembly, 11-8. Restrict Who Can Extend Your Classes and Override Class Members, 11-10. Determine If the Current User Is a Member of a Specific Windows Group, 11-11. Restrict Which Users Can Execute Your Code, 11-12. Impersonate a Windows User, 11-14. Calculate the Hash Code of a Password, 11-16. Verify a Hash Code, 11-17. Ensure Data Integrity Using a Keyed Hash Code, 11-18. Work with Security-Sensitive Strings in Memory, 11-19. Encrypt and Decrypt Data Using the Data Protection API, 12-1. Call a Function in an Unmanaged DLL, 12-3. Call an Unmanaged Function That Uses a Structure, 12-6. Use a COM Component in a .NET Client, 12-10. Expose a .NET Component Through COM, 13-1. Implement a Custom Serializable Type, 13-2. Implement a Cloneable Type, 13-3. Implement a Comparable Type, 13-4. Implement an Enumerable Collection, 13-5. Implement an Enumerable Type Using a Custom Iterator, 13-6. Implement a Disposable Class, 13-7. Implement a Formattable Type, 13-8. Implement a Custom Exception Class, 13-11. Implement the Observer Pattern, 13-13. Perform Lazy Object Initialization, 13-17. Create a Variant Generic Type, 14-1. Access Runtime Environment Information, 14-4. Read and Write to the Windows Registry, 14-5. Search the Windows Registry, 14-6. Create a Windows Service, 14-8. Create a Shortcut on the Desktop or Start Menu, 14-9. Create a Windows 7 Jump List, 14-12. Display a Task Dialog, 14-13. Write Custom Performance Counters, 15-1. Perform Simple Parallel Tasks, 15-4. Parallel Process a Collection, 15-7. Handle Exceptions in Tasks, 15-9. Share Data Between Tasks, 16-1. Perform a Simple LINQ Query, 16-6. Filter and Select from Multiple Data Sources, 16-7. Use Permutations of Data Sources, 16-9. Group Result Elements by Attribute, 16-14. Create Custom LINQ Extension Methods, 17-1. Create and Use a Dependency Property, 17-2. Create and Use an Attached Property, 17-10. Get Rich Text Input from a User, 17-13. Support Application Commands in a User Control, 17-14. Create a Lookless Custom Control, 17-15. Create a Two-Way Binding, 17-16. Bind to a Command, 17-17. Use Data Templates to Display Bound Data, 17-18. Bind to a Collection with the Master-Detail Pattern, 17-21. Drag Items from a List and Drop Them on a Canvas, 17-22. Display the Progress of a Long-Running Operation and Allow the User to Cancel It, 17-26. Fill a Shape with a Linear or Radial Color Gradient, 17-27. Fill a Shape with an Image, 17-28. Fill a Shape with a Pattern or Texture, 17-29. Animate the Property of a Control, 17-30. Animate Several Properties in Parallel, 17-32. Animate an Object Along a Path, 17-33. Play a Media File