Ask Your Question
2

In C#, can you have different types of return values?

asked 2022-05-19 11:00:00 +0000

huitzilopochtli gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2022-06-04 00:00:00 +0000

bukephalos gravatar image

Yes, in C# you can have different types of return values. The return type of a method can be any valid C# data type such as int, float, double, bool, string, or any other custom data type. You can also have methods that do not return any value, in which case the return type would be void.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2022-05-19 11:00:00 +0000

Seen: 20 times

Last updated: Jun 04 '22