C# C# Basics (Retired) Perform Converting Strings to Integers

ultan gannon
ultan gannon
4,246 Points

I dunno what Im doing here

?

CodeChallenge.cs
string heightInput = "168";
var height= int.Parse (heightInput);
Kevin Oneill
Kevin Oneill
6,509 Points
string heightInput = "168";
int height = int.Parse(heightInput);

2 Answers

Steven Parker
Steven Parker
186,663 Points

The challenge is being pickier than the language.

As Kevin suggested, you can pass the challenge by explicitly declaring your variable as int.

But in practice, it should be equally effective and acceptable to declare it using var.
You might want to report this as a bug to Support.