- Home /
Js to C# convert
A quick question: how to convert this to c#: public hostInfo[]; hostInfo = ""; or the connect script of this:[link text
Comment
Best Answer
Answer by Joyrider · Aug 18, 2013 at 05:35 PM
You basically just have to type your variables
var hostInfo;
hostInfo = "[";
for (var host in element.ip)
hostInfo = hostInfo + host + ":" + element.port + " ";
hostInfo = hostInfo + "]";
GUILayout.Label(hostInfo);
Translates to C# like this :
string hostInfo;
hostInfo = "[";
foreach (sting host in element.ip)
hostInfo = hostInfo + host + ":" + element.port + " ";
hostInfo = hostInfo + "]";
GUILayout.Label(hostInfo);
Your answer
Follow this Question
Related Questions
how can convert this in js? 1 Answer
Trying to Convert this JS to C# 2 Answers
Converting JS to C# 3 Answers
Multiple Cars not working 1 Answer