文件名称:
Sybex - Mastering Visual Basic .NET VB NET Functions (VBL).pdf
开发工具:
文件大小: 223kb
下载次数: 0
上传时间: 2019-08-15
详细说明: Bonus Reference VB.NET Functions and Statements This bonus reference describesthe functions and statements that are supported by Visual Basic .NET, grouped by category. When you’re searching for the statement to open a file, you probably want to locate all file I/O commands in one place. This is exactly how this reference is organiz ed. Moreover, by grouping all related functions and statements in one place, I can present examples that combine more than one function or statement. The majority of the functions are the same as in VB6. One difference is that many of the VB6 statements are implemented as functions in VB.NET. Moreover, many VB6 functions have an equivalent method in a Framework class. VB programmers are so accustomed to the old func- tions that they will not consider the alternatives—at least for a while. The Len() function of VB6 returns the length of a string. In VB.NET you can retrieve the length of a string with the Length method of a string variable. If strVaris declared as string variable, you can retrieve its length by calling the Length method: Dim strVar As String = “a short string” Console.WriteLine(“The string contains “ & strVar.Length & “ characters”) Or you can call the Len() function passing the name of the string as argument: Dim strVar As String = “a short string” Console.WriteLine(“The string contains “ & Len(strVar) & “ characters”) Most of the built-in functions are VB6 functions, and they accept optional arguments. VB.NET uses overloaded forms of the same function, and this is an important difference you have to keep in mind as you work with the built-in functions. If you omit an optional argument, you must still insert the comma to indicate that an argument is missing. Optional arguments are enclosed in square brackets. The Mid() function, for example, extracts a number of characters from a string, and its syntax is newString = Mid(string[, start][, length]) The starting location of the characters to be extracted is specified by the startargument, and the number of characters to be extracted is length. If you omit the startargument, the extraction starts with the first character in the string. If you omit the lengthargument, all the characters from the specified position to the end of the string are extracted. The only mandatory argument is the first one, which is the string from which the characters will be extracted, and this argument can’t be omitted. The methods of the various classes are discussed in detail in the book. This bonus reference con- tains all the functions supported by VB.NET, and these functions are listed by category in Table 1. Items in the table that are not followed by parentheses are statements and are also described in this reference.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
相关说明
- 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
- 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度。
- 本站已设置防盗链,请勿用迅雷、QQ旋风等多线程下载软件下载资源,下载后用WinRAR最新版进行解压.
- 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
- 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
- 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.
相关搜索: