How can i store in an integer array a negative number of type string?i mean i want it to be recognized that it is a negative nr.
pucivogel
0
Newbie Poster
Recommended Answers
Jump to PostJust a wild guess at what you want but a negative number can be represented in a string simply by the negation operator like so :
string negativeFive = "-5"
.
Then if you want to convert it back, then you can check ifnegativeFive[0] == '-'
and if it …
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.