brando5393 / keyboardstoplog

A program that allows keyboard players to log the stops they use for the songs they play
1 stars 0 forks source link

Some issues compiling C# #8

Open d4rkd0s opened 8 years ago

d4rkd0s commented 8 years ago

When running line 72

string[] entry = {keyboardType,songName,stopOneName,stopOneNum,stopTwoName,stopTwoNum,stopThreeName,stopThreeNum,styleName,styleNum};//convert int to string

I get the following:

Error(s):
(72:65) Cannot implicitly convert type 'int' to 'string'
(72:88) Cannot implicitly convert type 'int' to 'string'
(72:113) Cannot implicitly convert type 'int' to 'string'
(72:136) Cannot implicitly convert type 'int' to 'string'
ghost commented 8 years ago

It appears that your variables stopOneNum, stopTwoNum, stopThreeNum and styleNum are all of the int type when you are trying to put them in your string[] entry object. I would recommend calling the .ToString() method on these variables, as shown here:

string[] entry = { keyboardType, songName, stopOneName, stopOneNum.ToString(), stopTwoName, stopTwoNum.ToString(), stopThreeName, stopThreeNum.ToString(), styleName, styleNum.ToString() }; //convert int to string

d4rkd0s commented 8 years ago

@brando5393 what do you think?