VB
dxm809
这个作者很懒,什么都没留下…
展开
-
vb.net实例化数组
Dim readBuff As Byte() = New Byte(1023) {}原创 2020-12-02 13:25:49 · 642 阅读 · 0 评论 -
VB递归转换文件夹里面的文件,并对应生成目录
Imports System.IOPublic Class FormatHelper Private Shared BaseDir As String = "" Public Shared Sub ToData(ByVal rootDir As String, ByVal src As String, ByVal dst As String) If rootDir <> "" Then BaseDir = rootDir .原创 2020-11-27 11:06:45 · 236 阅读 · 0 评论 -
分段循环处理的经典写法
Private Sub DecodeScanLog(ByVal lines As List(Of String), ByRef lst As List(Of ScanInfo)) Dim count = 0 Dim startIndex = lines.FindIndex(Function(s) s.Contains("Cell") And s.Contains("Address")) Dim partLines As List(Of String) = ..原创 2020-11-24 11:19:08 · 333 阅读 · 0 评论 -
vb 对象到xml的存入和读取
Public Function SaveConfigToFile(Of T)(ByVal strFilePath As String, ByVal data As T) As Boolean Dim objStreamWriter As New StreamWriter(strFilePath) Try Dim xsSerialize As New XmlSerializer(data.GetType) xsSeria...原创 2020-07-10 08:46:11 · 248 阅读 · 0 评论 -
xml替换节点值
Imports System.IOModule Module1 Sub Main() Dim srcDir = "" Dim dstDir = "" If Not ReplaceTcParameters(srcDir, dstDir) Then Console.WriteLine("Failed") End If Console.Read() End Sub Public .原创 2020-06-16 11:44:37 · 615 阅读 · 0 评论 -
vb.net泛型得写法
Imports System.IOImports System.Xml.SerializationPublic Module Module1 Sub Main() Dim cc As clsCustomConfig = New clsCustomConfig() cc.CellConfigList = New List(Of clsCellConfig) cc.CellConfigList.Add(New clsCellConfig() Wi.原创 2020-05-19 14:20:44 · 754 阅读 · 0 评论 -
UDP TCP 双流
Imports System.IOImports System.ThreadingImports BaseDLLImports BaseDLL.BasePubModuleImports Newtonsoft.JsonImports ZedGraphPublic Class FormMultiThreadDataThroughput Private m_IpVersion ...原创 2020-04-30 17:36:56 · 350 阅读 · 0 评论 -
VB-字符串数组常用处理
Module Module1 Sub Main() Dim strs As String() = {" 1, ", " 2, ", " 3, "} strs = strs.Select(Function(s) s.Trim(New Char() {",", " "})).ToArray() Dim Res As St...原创 2019-08-22 11:39:20 · 3525 阅读 · 0 评论 -
vb-sum
Module Module1 Sub Main() FuncDelegate() End Sub Public Sub FuncDelegate() Dim P_List_user As List(Of User) = New List(Of User)() P_List_user.Add(New User("小刘", 3...原创 2019-08-22 09:22:38 · 863 阅读 · 0 评论 -
websocket 发送json
Module Module1 Sub Main() Try Dim m_IMSCOMAddress As String = "ws://" + "99.99.99.99" + ":9001" Dim m_ws = New RemoteCmdHelper(m_IMSCOMAddress) m_ws.m_...原创 2019-08-21 17:26:35 · 6195 阅读 · 0 评论 -
通过putty执行Linux命令
Module Module1 Dim m_RemoteServerAddr As String = "99.99.99.99" Sub Main() Try If Not My.Computer.Network.Ping(m_RemoteServerAddr, 1000) Then Console.WriteL...原创 2019-08-21 17:26:28 · 1394 阅读 · 0 评论 -
VB-数组、集合、泛型
变量、数组、集合、泛型的发展最开始用内存中一个位置映射一个值,用变量来“使用”这个值。进一步发展,用变量来引用一组值,这就是数组。由数组概念,发展出链表、堆、栈,进行排序、检索等。但这并不能完全表达,由此发展出集合概念,它是更强大的数组,都依赖于Object基类。随之而来的是集合中元素并不一定是...转载 2019-06-24 16:09:59 · 2635 阅读 · 0 评论 -
VB数组、集合、泛型
变量、数组、集合、泛型的发展最开始用内存中一个位置映射一个值,用变量来“使用”这个值。进一步发展,用变量来引用一组值,这就是数组。由数组概念,发展出链表、堆、栈,进行排序、检索等。但这并不能完全表达,由此发展出集合概念,它是更强大的数组,都依赖于Object基类。随之而来的是集合中元素并不一定是...转载 2019-07-10 08:02:59 · 464 阅读 · 0 评论