C# double to float convert
I have a little problem with converting double to float. Code
float volume = 0.5;
Double i = Volume.Value;
volume = (float)i / 100F;
Bass.BASS_SetVolume(volume);
As You can see I'm using BASS Library. Volume is a Slider that gives me a
value from 1 to 100. The problem is I'm getting this error:
error CS0664: Literal of type double cannot be implicitly converted to
type 'float'; use an 'F' suffix to create a literal of this type
Why? I Searched on google, found nothing. Please help.
No comments:
Post a Comment