String Array, comment faire ?
Bonjour à tous,
Voici le code source que j'ai codé il y a quelques temps, et je désire le passer en VB.NET , tout est ok , sauf le Array de l'ip :/
VBS :
Code:
1 2 3 4 5
|
dim strNull,obj
Set objDNS = GetObject("winMgmts:root\MicrosoftDNS")
Set objDNSZone = objDNS.Get("MicrosoftDNS_Zone")
strNull = objDNSZone.CreateZone("testdelamortue",1,false,"dinao.dns.txt",array("192.168.0.4")) |
VB.NET :
Code:
1 2 3 4 5 6
| Dim strNull
objDNS = GetObject("winMgmts:root\MicrosoftDNS")
objDNSZone = objDNS.Get("MicrosoftDNS_Zone")
Dim MyArray() As String
MyArray(0) = "192.168.0.4"
strNull = objDNSZone.CreateZone("unpetittest", 1, False, "dinao.dns.txt", MyArray) |
Type Mismatch sur MyArray :/