Question: USING C# 5. Write a public polymorphic void function to write out a label (text string) and a value to a console. The lab and
USING C#
5. Write a public polymorphic void function to write out a label (text string) and a value to a console. The lab and value are passed as arguments to the function. You should have separate versions of the function for double, int, DateTime, String, and Boolean type values. The label should be written out in a 20 character wide left aligned field, followed by the value: a. Double values should be written out in #,##0.00 format (14 character wide field right align), b. Integers values should be written out in #.##0 format (14 character wide field, right align) c. Date values should be written out as short dates (14 character wide field, left align) d. Strings values should be written out as is (14 character wide field. left align truncate string to 14 characters if needed) e. Boolean values should be written out left aligned in a 14 character wide field
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
