Answer the following questions, which cover the concepts of today's learning:
- What are
ValueTuple
types? - ValueTuples are mutable; prove with an example.
- Create a
ValueTuple
of 10 elements.
- Create a user-defined class employee as follows and then write a program to deconstruct user-defined types:
public class employee { public Guid EmplId { get; set; } public String First { get; set; } public string Last { get; set; } public char Sex { get; set; } public string DepartmentId { get; set; } public string Designation { get; set; } }
- Create a class of various constants using digit separators and implement these constants to a function
ToDecimal()
andToBinary()
. - What are local functions? How are they different from private functions?
- Rewrite the
OddEven
program using generic local functions. - Rewrite the
OddEven
program using the type pattern inswitch
case. - Write a program to find out
OddEven
with the utilization of inferred Tuple names feature of language C# 7.1. - What is default expression...