a) Add the appropriate data annotation attributes to the below model class to ensure name field...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
a) Add the appropriate data annotation attributes to the below model class to ensure name field is not empty and address between 5 and 25 characters. (3 marks) public class User } b) Mention the numbers of four syntax errors in the code below. Re-write code in correct way. (4 marks) public static void Main(string[] args) { 9 10 - 11 12 13 - 14- 15 16- 17 18- 19 20 21 public string name {get; set; } public string address {get; set;} 222 23 } } Console.WriteLine "Hello Guys!"); int[] marks (100,87,12,45.23); foreach(int m at marks) { if(m>=85){ Console.WriteLine("You got HD"); }else if (m>=50) { }else{ Console.WriteLine("You Console.WriteLine("You just Pass") failed"); a) Add the appropriate data annotation attributes to the below model class to ensure name field is not empty and address between 5 and 25 characters. (3 marks) public class User } b) Mention the numbers of four syntax errors in the code below. Re-write code in correct way. (4 marks) public static void Main(string[] args) { 9 10 - 11 12 13 - 14- 15 16- 17 18- 19 20 21 public string name {get; set; } public string address {get; set;} 222 23 } } Console.WriteLine "Hello Guys!"); int[] marks (100,87,12,45.23); foreach(int m at marks) { if(m>=85){ Console.WriteLine("You got HD"); }else if (m>=50) { }else{ Console.WriteLine("You Console.WriteLine("You just Pass") failed");
Expert Answer:
Answer rating: 100% (QA)
From the provided image we need to do the following a Add data annotation attributes to ensure that ... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
A researcher wanted to find out if there was difference between older movie goers and younger movie goers with respect to their estimates of a successful actors income. The researcher first...
-
What would likely happen to long-run average cost at Oman's facility if engineers encountered difficulties in maintaining the facility's substantial daily volume of oil production? Explain.
-
Selected account balances for Maria's Mocha at the end of the month are listed below in random order: Accounts Payable .................................................................... $14,800...
-
Each member of a random sample of 15 business economists was asked to predict the rate of inflation for the coming year. Assume that the predictions for the whole population of business economists...
-
Use technology and the data in RestaurantTips to construct a graph of the relationship between Server and Credit for the situation in Exercise 2.38. Data From Exercise 2.38: Credit Card by Server The...
-
Assuming that everyone on the Internet used PGP, could a PGP message be sent to an arbitrary Internet address and be decoded correctly by all concerned? Discuss your answer.
-
How do contingent workforce arrangements, such as outsourcing and gig economy platforms, disrupt traditional hierarchical structures and necessitate innovative approaches to talent management and...
-
Below is review of the books and records at December 31 for East West College. The review has identified the matters that may need addressing. Record any adjustments required to complete the year end...
-
Instructions Collegiate Publishing Inc. began printing operations on March 1. Jobs 301 and 302 were completed during the month, and all costs applicable to them were recorded on the related cost...
-
What might account for the fact that, on average, the investor return provided by the firms of endearment exceeded that of the Standard and Poors and Dow Jones averages?
-
How and why would a country give up any of its sovereign powers?
-
Critics of the new hybrid benefit corporation have suggested that benefit corporation laws are unnecessary because corporations are already permitted to operate with a corporate social responsibility...
-
Could a contract be difficult to categorize as either public or private international law? What would such a contract look like?
-
As you have seen in this chapter, international trade law is founded on the importance and benefits of removing trade barriers. However, WTO rules also recognize the need to restrain trade in certain...
-
Discuss: 1) How did the selection of key performance indicators (KPIs) affect behavior? 2) Does Wells Fargo have conflicting KPIs between different departments? 3) What mistakes have Wells Fargo...
-
Determine the resultant moment produced by the forces about point O. 0.25 m 0.125 m, 0 0.3 m- 60 F = 500 N F = 600 N
-
Calculate the amount of the child and dependent care credit allowed for 2012 in each of the following cases, assuming the taxpayers had no income other than the stated amounts. a. William and Carla...
-
Charlie's Green Lawn Care is a cash basis taxpayer. Charlie Adame, the sole proprietor, is considering delaying some of his December 2012 customer billings for lawn care into the next year. In...
-
a. Wilson filed his individual tax return on the original due date, but failed to pay $700 in taxes that were due with the return. If Wilson pays the taxes exactly 2 months late, calculate the amount...
-
Two radio stations have the same power output from their antennas. One broadcasts AM at a frequency of \(1000 \mathrm{kHz}\) and one broadcasts FM at a frequency of \(100 \mathrm{MHz}\). Which...
-
A paramecium is covered with motile hairs called cilia that propel it at a speed of \(1 \mathrm{~mm} / \mathrm{s}\). If the paramecium has a volume of \(2 \times 10^{-13} \mathrm{~m}^{3}\) and a...
-
Photon P in Figure Q28.35 moves an electron from energy level \(n=1\) to energy level \(n=3\). The electron jumps down to \(n=2\), emitting photon \(\mathrm{Q}\), and then jumps down to \(n=1\),...
Study smarter with the SolutionInn App