понедельник, 23 ноября 2015 г.

WebApi Mapping

1. Request find success Method in Controller if

if( Request.Parameters  >=  Controller.Method.Parameter)
{
      Find Method to ProcessRequest is Succesfull
}
else
      Find Method to ProcessRequest is Failure

for example

if Request = = param1=1&param2=2&param3=3
{
     Find Method(param1, param2) is Successfull
}

if Request  = = param1=1&param2=2
{
     Find Method(param1, param2, param3) is Failure
}

четверг, 19 ноября 2015 г.

Convert c#

The following table is from the documentation, which is why you are allowed to assign the value without an explicit cast or conversion:
From        To
===============================================================================
sbyte       short , int, long, float, double, or decimal
byte        short , ushort, int, uint, long, ulong, float, double, or decimal
short       int , long, float, double, or decimal
ushort      int , uint, long, ulong, float, double, or decimal
int         long , float, double, or decimal
uint        long , ulong, float, double, or decimal
long        float , double, or decimal
char        ushort , int, uint, long, ulong, float, double, or decimal
float       double
ulong       float , double, or decimal
And in the documentation it states (emphasis mine):
Precision but not magnitude might be lost in the conversions from int, uint, long, or ulong to float and from long or ulong to double.