Skip to content

What's the difference? And why? #193

Answered by PatrickAlphaC
amanbthakkar asked this question in Q&A
Discussion options

You must be logged in to vote

You got it :)

This first one "returns" a SimpleStorage type.

simpleStorageArray[_simpleStorageIndex]

This next one says to cast whatever simpleStorageArray[_simpleStorageIndex] returns, to a SimpleStorage type, so it's redundant.

SimpleStorage(simpleStorageArray[_simpleStorageIndex])

It's totally not necessary to do the SimpleStorage(...) wrapping for this.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by PatrickAlphaC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants