x


String question Javascript to C# (easy)

I am unsure on how to convert this myself as do not use strings often.

var level : String;

Javascript ^^

I tried

public String level;

C# ^^

But no luck.. What am I missing I took a quick glance at the reference but didn't find something similar in C#.

more ▼

asked Dec 18 '10 at 02:12 AM

doomprodigy gravatar image

doomprodigy
557 22 26 31

Unity doesn't use Java; it's a different language entirely.

Dec 18 '10 at 03:42 AM Eric5h5

eric when does he say java the whole time he says javascript which unity uses...

Dec 18 '10 at 05:02 AM Nynex71

He probably edited the title, I have a habbit of writing Java instead of Javascript or Unityscript. (I code in C# mainly.)

Dec 18 '10 at 01:07 PM doomprodigy
(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

Look for MONO or C# at Microsofts website, then you will have all your answers regarding language problems.

I believe string is with small-caps

  public string level;

http://msdn.microsoft.com/en-us/library/362314fe(v=vs.71).aspx

more ▼

answered Dec 18 '10 at 02:22 AM

BerggreenDK gravatar image

BerggreenDK
2.4k 54 62 75

Can't believe I missed that myself. - facepalm

Dec 18 '10 at 02:39 AM doomprodigy

hehe, dont hurt yourself. We've all searched the woods for hours without finding trees. Looking forward to your next question now. :o)

Dec 18 '10 at 02:43 AM BerggreenDK
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x3464
x420
x69

asked: Dec 18 '10 at 02:12 AM

Seen: 1805 times

Last Updated: Dec 18 '10 at 03:38 AM