Click here to Skip to main content
15,905,028 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Person’s place of birth -> string
Person’s year of birth (1999) -> int
License Plate ("AMXT 048") -> string
Person’s age (21) -> int
Student’s mark (70.5) -> double
Cost of a product (14.50) -> double
Person’s name ("Amardeep") -> string
Person’s exact height (155.65) -> double


What I have tried:

I've been trying to figure out how to declare certain things and I've done some but these are driving me nuts I cant figure out how to declare these. every time I try my vs shuts down and when it stays open it comes back with errors and i cant view it at all. If anyone can help that would be awesome of them.
Posted
Updated 7-Feb-17 21:26pm
Comments
Maciej Los 8-Feb-17 1:49am    
Sorry, but your question is not clear. Seems, you have declared proper data type. If VS hangs on exit, you have to re-install it.
F-ES Sitecore 8-Feb-17 4:29am    
It sounds like you are having issues with Visual Studio more than your code, that's not really within the remit of this forum. Try an uninstall and re-install. I'd also advise you to get a book on c# and go through it, you can't learn a language from scratch via forum posts.

When you posted this yesterday: I'm trying to figure out the right data type and then declare each of them into variables[^] you were given answers - so what is stopping you from doing it now?

And don't store "year of birth" and "age" - store "date of birth" and calculate "age" from that. "Age" isn't a fixed value-added it changes according to when you ask the question. For example, it may be illegal for someone to drink alcohol today, but tomorrow is third birthday so they reach the legal age and can drink without being arrested.
 
Share this answer
 
I suggest you start with the basics[^] and get familiar with Getting Started with Visual C# and Visual Basic[^]
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900