- 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.
推薦閱讀
- Learning Python Web Penetration Testing
- Python for Secret Agents:Volume II
- Ceph Cookbook
- PyQt從入門到精通
- TestNG Beginner's Guide
- Learn Scala Programming
- 人人都是網(wǎng)站分析師:從分析師的視角理解網(wǎng)站和解讀數(shù)據(jù)
- Asynchronous Android Programming(Second Edition)
- Integrating Facebook iOS SDK with Your Application
- 深度學習:Java語言實現(xiàn)
- Visual Basic程序設計習題與上機實踐
- C#程序設計基礎入門教程
- 現(xiàn)代CPU性能分析與優(yōu)化
- JavaScript前端開發(fā)基礎教程
- 深入理解Kafka:核心設計與實踐原理