TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
jesper
NA
89
54.2k
Convert vb to c#
Nov 9 2012 9:19 AM
i will like to ask if anyone can convert this simple vb script to c# :i im a beginner so it would be nice to have an example.
strComputer =
"."
Set
objWMIService = GetObject(
"winmgmts:"
_ &
"{impersonationLevel=impersonate}!\\"
& strComputer &
"\root\cimv2"
)
Set
objNewPort = objWMIService.
Get
_ (
"Win32_TCPIPPrinterPort"
).SpawnInstance_ objNewPort.Name =
"IP_10.10.10.113"
objNewPort.Protocol =
1
objNewPort.HostAddress =
"10.10.10.113"
objNewPort.PortNumber =
"9100"
objNewPort.SNMPEnabled =
False
objNewPort.Put_
Set
objPrinter = objWMIService.
Get
(
"Win32_Printer"
).SpawnInstance_ objPrinter.DriverName =
"HP LaserJet 4000 Series PS"
objPrinter.PortName =
"IP_10.10.10.113"
objPrinter.DeviceID =
"FrontOffice"
objPrinter.Network =
True
objPrinter.Put_
//Thanks :)
Reply
Answers (
5
)
how to transfer the data from xml node data into html Table format?
C# 2008 write to console log file