Convert data types using casting and conversion techniques in C#
Take control of the data in your applications, knowing when to apply the correct technique to change data types as needed.
Learning objectives
Use the casting operator to cast a value into a different data type.
Use conversion methods to convert a value into a different data type.
Guard against the loss of data when performing a cast or conversion operation.
Use the TryParse() method to safely convert a string into a numeric data type.
Thêm
Prerequisites
Experience using data types like string, int, decimal, float, and so on
Experience using arrays and the foreach iteration statement
Experience using string interpolation to combine variable and literal values for output
Experience using Visual Studio Code to develop, build, and run C# code
Mô-đun này nằm trong các lộ trình học tập sau
Bài đánh giá mô-đun
Đánh giá sự hiểu biết của bạn về mô-đun này. Đăng nhập và trả lời đúng tất cả các câu hỏi để nhận được chứng nhận "Đạt" trên hồ sơ của bạn.
Làm bài đánh giá mô-đun