错误错误1'字符串'不是'Char'的成员 [英] Error Error 1 'string' is not a member of 'Char

查看:75
本文介绍了错误错误1'字符串'不是'Char'的成员的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

错误错误1''字符串''不是''Char的成员是什么意思?开始代码

 功能 GetIPAddress( ByVal  CompName 作为 字符串作为 字符串 
Dim oAddr 作为系统。 Net.IPAddress
Dim sAddr As String
尝试
使用 System.Net.Dns.GetHostName(CompName) )
oAddr = System.Net.IPAddress(。 string

解决方案

这意味着您错误输入了这一行

 oAddr = New System.Net.IPAddress < b>(。字符串)。





用更合适的参数替换 .string


我刚刚使用了oldy(.AddressList(0) 。地址)

Error Error 1 ''string'' is not a member of ''Char what does it mean ? Begining of code

Function GetIPAddress(ByVal CompName As String) As String
    Dim oAddr As System.Net.IPAddress
    Dim sAddr As String
    Try
        With System.Net.Dns.GetHostName(CompName)
            oAddr = New System.Net.IPAddress(.string)

解决方案

It means that you have mistyped this line

oAddr = New System.Net.IPAddress(.string).



Replace the .string with a more appropriate parameter


I just used the oldy (.AddressList(0).Address)


这篇关于错误错误1'字符串'不是'Char'的成员的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆