2:13 Hi Happy Sir, Integer to object involves boxing it is ok then is it string to object is not involve boxing I think is it correct or not but i agree with convertion i ask this question because of string also reference type and object also reference type then how boxing is possible?
@nithin-j2e4 ай бұрын
simple and straight
@KIRANKUMAR-mn6rw2 жыл бұрын
how do equate class using generics? say u have class A with set of properties and class B with other set of properties so now how do u compare?
@interviewhappy2 жыл бұрын
Hi Kiran, I think object.Equals and with generics this IEquatable will do what you are asking.
@ssmcs0602 жыл бұрын
Apart from object, cant we use method overloading?
@interviewhappy2 жыл бұрын
Yes Sampat you are right, but then you have to write more lines of code for new overloaded methods which is a overhead then.
@ssmcs0602 жыл бұрын
@@interviewhappy hummmm. I was also started thinking this lately. If 2 such methods exist then results in 4 methods.
@vinaybammidi71232 жыл бұрын
Thank you. Very useful. Generic are necessary.
@interviewhappy2 жыл бұрын
Welcome Vinay
@sribardhansimhadri36132 жыл бұрын
Very Nice Explanation
@shreedharrs9540 Жыл бұрын
Pls make a video of framework automation it is helpful every one pls do it asap
@interviewhappy Жыл бұрын
Sure, I will try, but it might take some time. All the best.
@lakshmisony88034 ай бұрын
So in generic class we have to define static class only.is'tit?
@rohitharajayalakshmi67293 ай бұрын
no for static also -- for class generic using System; public class HelloWorld { public static void Main(string[] args) { cal c = new cal(); int str = c.AreEqual(3,3); cal cl = new cal(); string str1 =cl.AreEqual("r","r"); Console.WriteLine(str); Console.WriteLine(str1); Console.ReadLine(); } public class cal { public T AreEqual(T x, T y) { return x; } } } -- for method generic using System; public class HelloWorld { public static void Main(string[] args) { cal c = new cal(); int str = c.AreEqual(3,3); string str1 =c.AreEqual("r","r"); Console.WriteLine(str); Console.WriteLine(str1); Console.ReadLine(); } public class cal { public T AreEqual(T x, T y) { return x; } } }
@deepakgupta57332 жыл бұрын
What does generics internally use?
@interviewhappy2 жыл бұрын
Good question Deepak. I will get back on this and if you know, then you can share.
@danielroma2370 Жыл бұрын
Good explanation, thank you!
@interviewhappy Жыл бұрын
Glad it was helpful! Daniel
@Khushi-FoodPlaza7 ай бұрын
Please make video on array 😢real time projects pls
@sahaksargsyan7397 Жыл бұрын
Hello Happy, it will be nice, if you make video about inheritance from generic class. Thank you
@madhavikiran69202 жыл бұрын
Can you make video on Generic collection?
@interviewhappy2 жыл бұрын
Sure Madhavi
@bandarapurajashekarreddy1692 Жыл бұрын
Please do video on Reflection in c#
@interviewhappy Жыл бұрын
Sure Raja, soon I will
@leelanp2 жыл бұрын
good explanation
@interviewhappy2 жыл бұрын
Thanks Leela
@imadabab Жыл бұрын
Good explanation. Thanks.
@interviewhappy Жыл бұрын
You're welcome!
@prabhatkumar353 Жыл бұрын
Thanku sir Nice explanation
@interviewhappy Жыл бұрын
Always welcome @prabhat
@kaniyansai Жыл бұрын
Very very useful
@interviewhappy Жыл бұрын
Glad you think so@ kaniyansai
@poojachavan396 Жыл бұрын
Can you make video on Entity framework core interview questions?
@interviewhappy Жыл бұрын
I added some questions of EF but not all. May be in future I will add them.