vb.net - 使用此函数映射网络驱动器时 "R"c 是什么意思

标签 vb.net vb.net-2010 network-drive

我复制了代码以从 http://www.vbforums.com/showthread.php?t=616519 映射网络驱动器映射驱动器和 http://cjwdev.wordpress.com/2010/05/30/delete-network-drive/删除驱动器。我想知道这段代码中的“R”c 意味着什么:

    RemoveNetworkDrive("R"c, True)

来自第一个链接,然后我想知道如何在变量中模拟此表示法,以便我可以检查第一个可用驱动器并将网络驱动器映射到该字母。我会在谷歌上搜索它,但由于我不知道“R”c 是什么意思,所以很难。

最佳答案

"R"c"R"Char 版本。当您想要指定字符而不是字符串时,可以使用它。

MSDN 有一些详细信息 here :

You can also create an array of strings from a single string by using the String.Split Method. The following example demonstrates the reverse of the previous example: it takes a shopping list and turns it into an array of shopping items. The separator in this case is an instance of the Char data type; thus it is appended with the literal type character c.

Dim shoppingList As String = "Milk,Eggs,Bread"
Dim shoppingItem(2) As String
shoppingItem = shoppingList.Split(","c)

关于vb.net - 使用此函数映射网络驱动器时 "R"c 是什么意思,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7528978/

相关文章:

vb.net - 有没有一种简单的方法可以在 VB.NET 中随机化列表?

javascript - 如何从 ASP.NET .asmx 返回 JSON?

vb.net - 在Prism中将 View 与非默认构造函数一起使用

batch-file - pushd - 从 cmd 处理多个驱动器

java - eclipse-如何从远程网络驱动器添加现有源文件夹

Java,用什么代替PrintStream来获取异常?

asp.net-mvc - Razor Html.ActionLink 参数

mysql - 尝试从 MySQL 读取时出现 "Object Reference not Set to an Instance of an Object"

wpf - 如何在VB.NET/WPF应用程序中拥有一个全局字典来保存来自不同窗口的数据?

mysql - 如何使用 vb.net 在 MySql 中保存和检索指纹模板?