hi Frnds
Today i attented an interviews but i didnot gave the ans in a proper way
so please give the answer so which i can give the next interview..
1 . if u used decimal , double , float so if we use three data type so which is the better ? why ?
2 . why we used private constructor ?
3 . inside view we are created ui page so it is case sensitive or not?
Manas MohapatraPosted Nov 20, 2016, 10:35 AM
Anjali KhanPosted Nov 22, 2016, 12:49 AM
Anjali KhanPosted Nov 20, 2016, 10:14 AM
Manas MohapatraPosted Nov 20, 2016, 1:00 AM
Float – 7 digits (32 bit)
Double-15-16 digits (64 bit)
Decimal -28-29 significant digits (128 bit)
Decimal is slower than double and float. Decimal has hieger precision value.
double and float are floating binary points where as Decimal stores floating decimal points.
For scientific data, you need to use float and double, for monetary you need to use Decimal.
Private Constructor:
A private constructor is a special instance constructor. If a class has one or more private constructors, other classes (except nested classes) cannot create instances of this class.
It is mostly used in singleton design pattern and factory design pattern.
Regarding View page:
It is not strictly case-sensitive. Means you have a view page called About.cshtml
And you are browsing like http://localhost:14901/Home/ABout
It will hit your About action and also return the About view page.