What does strongly typed means in .NET framework?

后端 未结 5 2252
悲哀的现实
悲哀的现实 2020-12-28 15:11

This morning was going through a book where I found a paragraph as stated below :

Each data field in a table is a strongly typed data member, fully compliant wit

5条回答
  •  春和景丽
    2020-12-28 15:55

    For e.g you cannot Multiply or Divide two different types i.e String vs Integer

    var answer = 1 * "1"; // you cannot do this
    

    You have to explicity cast it, this is known as strongly typed

    where as if you see in php

    $x = "3" * 1; // is correct in php
    

    So here you dont need to explicitly cast it.

提交回复
热议问题