[RESOLVED] converting type int to string continuous error???
i have the following code so the caption of the form shows the width of the device. But it keeps on with the error "cannot convert type int to string".
PresentParameters presParams = new PresentParameters();
Utility.DisplaySwitchingToRefWarning(sampleFramework,(string)presParams.DeviceWindow.Width);
i have tried adding ".tostring" on the end that won't work either...
Any thoughts
Cheers
GTJ
Re: converting type int to string continuous error???
If it is an int this should work
Code:
Utility.DisplaySwitchingToRefWarning(
sampleFramework,
presParams.DeviceWindow.Width.ToString()
);
failing that can you post the exact error message?
Re: converting type int to string continuous error???
cheers for replyin so quick.
However i have found another way round it by gettin the width value from e.device...
i think that the presParams width value was not an int, so that is y it caused an error.