This is a very common interview question where the interviewer will ask about Out and Ref keyword and basically want to know what is the difference between them. I have tried to explain it with an example.
Points to Remember :
Both keywords when used before method parameter, they get their value out from the method but ref keyword can take value of the parameter inside to method as well but out keyword cannot take any value inside the method we must initialize out parameter inside method before using it in case of out keyword.
ITExpertsEra is an organization that provides various mentorship programs to help students and experienced tech enthusiasts build their successful careers. All the courses provided by our team is highly result-oriented and focus to build overall development which includes but is not limited to technical knowledge of the latest technologies like c#, python, java, react js, angular, power bi, automation testing, machine learning, etc., interview preparation, personality development, leadership skills development and many more.
Follow us on the below platform
Linkedin : https://www.linkedin.com/company/74733592
Instagram : https://www.instagram.com/itexpertsera/
facebook : https://www.facebook.com/itexpertseratrainingcenter