Complete .NET Framework Secrets & Tips for Professionals

Complete .NET Framework Secrets & Tips for Professionals

.NET Framework CompleteComplete Tips & Secrets for Professionals .NET FrameworkTips & Secrets for Professionals 100+ pages of professional hints and tricks Disclaimer This is an unocial free book created for educational purposes and is GoalKicker.com not aliated with ocial .NET Framework group(s) or company(s). Free Programming Books All trademarks and registered trademarks are the property of their respective owners Contents About ................................................................................................................................................................................... 1 Chapter 1: Getting started with .NET Framework ........................................................................................ 2 Section 1.1: Hello World in C# ........................................................................................................................................ 2 Section 1.2: Hello World in F# ....................................................................................................................................... 2 Section 1.3: Hello World in Visual Basic .NET .............................................................................................................. 3 Section 1.4: Hello World in C++/CLI .............................................................................................................................. 3 Section 1.5: Hello World in IL ......................................................................................................................................... 3 Section 1.6: Hello World in PowerShell ......................................................................................................................... 3 Section 1.7: Hello World in Nemerle ............................................................................................................................. 4 Section 1.8: Hello World in Python (IronPython) ......................................................................................................... 4 Section 1.9: Hello World in Oxygene ............................................................................................................................ 4 Section 1.10: Hello World in Boo ................................................................................................................................... 4 Chapter 2: Collections ................................................................................................................................................. 4 Section 2.1: Using collection initializers ........................................................................................................................ 4 Section 2.2: Stack .......................................................................................................................................................... 5 Section 2.3: Creating an initialized List with Custom Types ...................................................................................... 6 Section 2.4: Queue ......................................................................................................................................................... 7 Chapter 3: XmlSerializer ............................................................................................................................................ 8 Section 3.1: Formatting: Custom DateTime format .................................................................................................... 8 Section 3.2: Serialize object .......................................................................................................................................... 9 Section 3.3: Deserialize object ...................................................................................................................................... 9 Section 3.4: Behaviour: Map array name to property (XmlArray) ........................................................................... 9 Section 3.5: Behaviour: Map Element name to Property ........................................................................................... 9 Section 3.6: Eciently building multiple serializers with derived types specified dynamically ............................. 9 Chapter 4: HTTP clients .......................................................................................................................................... 12 Section 4.1: Reading GET response as string using System.Net.HttpClient ........................................................... 12 Section 4.2: Basic HTTP downloader using System.Net.Http.HttpClient ................................................................ 12 Section 4.3: Reading GET response as string using System.Net.HttpWebRequest .............................................. 13 Section 4.4: Reading GET response as string using System.Net.WebClient ......................................................... 13 Section 4.5: Sending a POST request with a string payload using System.Net.HttpWebRequest ..................... 14 Section 4.6: Sending a POST request with a string payload using System.Net.WebClient ................................. 14 Section 4.7: Sending a POST request with a string payload using System.Net.HttpClient .................................. 14 Chapter 5: Exceptions ............................................................................................................................................... 15 Section 5.1: Catching and rethrowing caught exceptions ....................................................................................... 15 Section 5.2: Using a finally block ............................................................................................................................... 16 Section 5.3: Exception Filters ...................................................................................................................................... 16 Section 5.4: Rethrowing an exception within a catch block .................................................................................... 16 Section 5.5: Throwing an exception from a dierent method while preserving its information ........................ 17 Section 5.6: Catching an exception ........................................................................................................................... 17 Chapter 6: LINQ ........................................................................................................................................................... 18 Section 6.1: SelectMany (flat map) ............................................................................................................................ 24 Section 6.2: Where (filter) ........................................................................................................................................... 25 Section 6.3: Any ........................................................................................................................................................... 25 Section 6.4: GroupJoin ................................................................................................................................................ 25 Section 6.5: Except ...................................................................................................................................................... 26 Section 6.6: Zip ............................................................................................................................................................. 27 Section 6.7: Aggregate (fold) ..................................................................................................................................... 27 Section 6.8: ToLookup ................................................................................................................................................. 27 Section 6.9: Intersect ................................................................................................................................................... 28 Section 6.10: Concat .................................................................................................................................................... 28 Section 6.11: All ............................................................................................................................................................. 28 Section 6.12: Sum ......................................................................................................................................................... 28 Section 6.13: SequenceEqual ...................................................................................................................................... 29 Section 6.14: Min ........................................................................................................................................................... 29 Section 6.15: Distinct .................................................................................................................................................... 29 Section 6.16: Count ...................................................................................................................................................... 29 Section 6.17: Cast ......................................................................................................................................................... 29 Section 6.18: Range ....................................................................................................................................................

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    159 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us