Sasi Rekha
what is difference between var and dynamic ,difference between throw and throws
By Sasi Rekha in .NET on Dec 17 2018
  • anil penumacha
    Jun, 2021 4

    Var - checks datatype compile based on the assignment value.
    Ex : var obj = 10;
    obj data type will be integer.

    Dynamic - datatype of the object is known at runtime.

    Throw:
    Throw is a keyword which is used to throw an exception explicitly in the program inside a function or inside a block of code.

    Throws
    Throws is a keyword used in the method signature used to declare an exception which might get thrown by the function while executing the code.

    • 0
  • darshita mavani
    Jan, 2021 7

    var resolved at comipletime while dynamics is resolved at runtime

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS