First12Last
1 of 2 pages
  1. Answer
    In C# ref modifier is used to pass arguments by reference.
    Out: An out modifier is like a ref modifier except it need not be assigned before going into the function.
    Params: The params modifier may be specified on the last parameter of a method so that the method accepts any number of parameters of a particular type. The parameter type must be declared as an array.

    Explanation: Not available 


    1. Forum
  2. Answer
    An override method provides a new implementation of a member that is inherited from a base class. The method that is overridden by an override declaration is known as the overridden base method. The overridden base method must have the same signature as the override method.

    Explanation: Not available 


    1. Forum
  3. Answer
    Parameters are optional when a default value is specified as part of a declaration.
    Example: public List<Product> GetProductByCategory(string category, int pageIndex=0){}
    Here pageIndex is an optional parameter.
    Named arguments allow us to explicitly name an argument we are passing to a method – instead of just identifying it by argument position. 
    Example: var products= GetProductByCategory(“beverages”, pageIndex=2){} here pageIndex is a named argument.

    Explanation: Not available 


    1. Forum
  4. Answer
    When an instance method declaration includes a sealed modifier, that method is said to be a sealed method. If an instance method declaration includes the sealed modifier, it must also include the override modifier. Use of the sealed modifier prevents a derived class from further overriding the method.

    Explanation: Not available 


    1. Forum
  5. Answer
    Boxing:Boxing is the process of converting a value type to the object type or to any interface type implemented by this value type. When the CLR boxes a value type, it wraps the value inside a System.Object and stores it on the managed heap. 
    Unboxing: Unboxing extracts the value type from the object. Boxing is implicit; unboxing is explicit. The concept of boxing and unboxing underlies the C# unified view of the type system in which a value of any type can be treated as an object.

    Explanation: Not available 


    1. Forum
First12Last
1 of 2 pages