ref | out |
Parameters passed with the prefix “ref”. By using “ref” C# implements the concept called “Call by reference”. | Parameters passed with the prefix “out”. |
An argument passed by ref must be assigned with a value before the call. | ‘out’ parameter must assigned with some value prior to the termination of the function. |
Showing posts with label C# Interview Questions. Show all posts
Showing posts with label C# Interview Questions. Show all posts
Thursday, September 3, 2015
Daily Interview Questions #15 : What is the difference between the C# keywords ‘ref’ and ‘out’?
By
Francis
Posted at
5:26 AM
C# Interview Questions
No comments
Tuesday, July 8, 2014
Daily Interview Question #12 : What is the purpose of “sealed” keyword in C#?.
By
Francis
Posted at
6:31 PM
C# Interview Questions
No comments
Sunday, June 1, 2014
Daily interview Question #10 : what is the purpose of "explicit" implementation of interface?
By
Francis
Posted at
7:32 AM
CodeProject
No comments
There are 2 purposes of explicit implementation of Interface:
First, it is used to avoid name collision between interface methods. That is if you are going to create a class library, there may be a chance to use the same name in several places. At that time "explicit" implementation comes as a rescue.
Secondly, You cannot access that implemented method through the object of the class directly. Instead you typecast it as Interface reference then you can access it. This is because, the C# complier, unable to determine which one the user want to call.
Tuesday, February 4, 2014
Daily Interview Question #6: What are the different types of Constructor in C#?
By
Francis
Posted at
1:03 PM
C# Interview Questions
No comments
Below is the list of Constructors available in C#:
1. Default Constructor
2. Parameterized constructor
3. Static Constructor.
By default constructor have “public” as access specifier. A class can have more than one Constructor. In C# “this” keyword is used to access the constructor from another constructor. By default, C# will provide a default constructor if no constructor declared.
Hope this helps!
- Learn By Experience: SMS Gateways
- ASP.Net Forums - FAQ #2 : ASP.Net Project Ideas
- ASP.Net Forums – FAQ #1 : How to enable Adsense in my site?
- Main components of .Net Framework
- ASP.Net Forums–FAQ #6: ASP.Net Session Expired Problem
- How to Send SMS From ASP.Net Web Application?
- Visual Studio Tips & Tricks: 2 – Create Virtual Directory Problem
- Visual Studio Tips & Tricks–10 : How to Change the color theme in Visual Studio 2015?
- CRUD Operation - ASP.Net MVC with ADO.Net
- .Net Architecture