- C# 7 and .NET Core Cookbook
- Dirk Strauss
- 131字
- 2021-07-03 00:11:52
Getting ready
We will be using an often used method to test if a value is of a specific type. Yes, you guessed it, we're going to be using TryParse. I can already hear some of you groan (or is it just me?). Using TryParse is (for me anyway) such a bittersweet thing to do. It's great being able to try and parse something to test if it is valid, but the use of the out variable was never as neat and tidy as I would have liked. If you are not familiar with the TryParse method, it is a method that tests to see if a value parses to a specific type. If it does, TryParse will return a Boolean value of true ; otherwise, it will return false.
推薦閱讀
- DevOps:軟件架構師行動指南
- PWA入門與實踐
- 計算機圖形學編程(使用OpenGL和C++)(第2版)
- Python語言程序設計
- Hands-On Data Structures and Algorithms with JavaScript
- Learn Scala Programming
- 單片機應用技術
- PostgreSQL Replication(Second Edition)
- Java編程的邏輯
- 計算機應用基礎案例教程
- Unity 2017 Game AI Programming(Third Edition)
- Selenium WebDriver Practical Guide
- 樹莓派開發從零開始學:超好玩的智能小硬件制作書
- micro:bit軟件指南
- 走近SDN/NFV