Asp.Net 3.5 In Simple Steps- P5

In Simple Steps- P5:This is a book that helps you to learn using Visual Studio 2008. Precision, an easy-to-understanding style, real life examples in support of the concepts, and practical approach in presentation are some of the features that make the book unique in itself. The text in the book is presented in such a way that is equally helpful to beginners as well as professionals. | Chapter 2 Getting Started with Visual Studio 2008 Using variable prefixes this way provides some clue regarding variable s data type and that can be extremely helpful in case someone else reads your code. In the next section we learn about data types available in Visual Basic 2008. Data Types A data type determines the type of data that is stored in a variable. It can be String Integer Boolean etc. For creating a new variable we should first know the range of possible values a particular variable type allows. Table lists the data types of Visual Basic 2008 33 in Simple Steps Converting Data Types When we have to convert variable of one data type to another we should first know if the conversion is possible or not. Conversion between two data types is possible only when they are compatible. Visual Basic 2008 provides some conversion functions which arc useful for conversion between incompatible data types as shown in the following list CBoo 1 Converts to Boo lean data type CBy te Converts to Byte data type CChar Converts to Character data type CDate Converts to Date data type CDbl Converts to Double data type CInt Converts to Integer data type CLng Converts to Long data type COb j Converts to Object type CSBy te Converts to SByte type CShort Converts to Short data type CSng Converts to Single data type CStr Converts to String type CUInt Converts to Ulnteger type CULng Converts to ULong type CUShor Converts to UShort type A variable of type double can be converted into a variable of type integer with the help of the CInt function as follows If you cannot remember the name of a particular conversion function you can also use the CType function in which you can specify the target data type. For example 34 Chapter 2 Getting Started with Visual Studio 2008 Urheberret If conversion is not possible between the source and the target data types the function CType generates a compiler error. Visual Basic 2008 provides another function TryCast which returns .

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU MỚI ĐĂNG
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.