I have such method
public int foo()
{
return (int) MainJsonValues[JsonKeys.DP_PORT.Value];
}
This method should make cast and return this value
There is how I call this method
myObj.foo()
So, it is very strange because as we can see value contains in Dictionary
You can see my debug on screenshot
So, as far as I see this method can't convert from long
to int
...
Error
What am I doing wrong?
is
andas
operators do not cause conversion, only up/downcasts or unboxinglong
type, you can't cast it toint
on the such way