Click here to Skip to main content
15,904,351 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
how can I display the power of a given number in c# in a windows form.. as an example
Posted
Comments
yesotaso 9-Jun-11 4:47am    
Could you please be more specific? Is the form you want to show it or you want the result as 4?
RakeshMeena 9-Jun-11 23:07pm    
May I know the reason why my answer is downvoted. I'm trying to help here and this is what I get in return. Sick of you guys

Use the Math.Pow[^] method to compute the value (there's an example in the documentation page) and then show the value in a TextBox.
 
Share this answer
 
If you are looking for superscript or subscript kind of format, try RichTextBox instead. This link might help you.
 
Share this answer
 
Comments
Member 7980534 16-Jun-11 22:53pm    
It's working thank you very much. I hope your kindly help further more for my project.
Try:
2^2

Power sign is the up-arrow sign on the keyboard (along with number 6)
 
Share this answer
 

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