For example, an int with a value of 10 would always be converted to “10”, no? Is it not possible to define such conversion yourself?
EDIT: what I’m asking for is:
int i = 10;
Blah(i);
public void Blah(string param)
{
...
}
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
C# is a strongly typed language. Conversions like the one you are asking about are not implicit. Read this: http://msdn.microsoft.com/en-us/library/ms173104.aspx