

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


Total Marks: 20 Dead line: June 27, 2012
Intended purpose of this assignment is to give students an exercise using C# programming languages and to provide students with the knowledge and skills they need to develop C# applications for the Microsoft .NET Platform After attempting this assignment students will be able to:
Familiarize with the basic syntax in C# language.
Learn about the Enumeration data type used in C# and its importance.
Students will get understanding of basic Arrays syntax and declaration in C#.
Suppose you are developing a Web Mail Script Enterprise at Alstrasoft Pvt Ltd that strives to be the premier provider of web-based software solutions for businesses worldwide. As a web development and software company, Alstrasoft specialize mainly in web design and software programming.
Working in this web development environment a web based mail scripting application is required where users need an easy, safe and reliable method of eliminating spam emails by offering disposable email address that expires after a certain time limit. Web Email Script not only provides disposable email service but it is also a C# web mail script with "gmail style" interface.
Now being a Software Developer at this company, you are required to answer following questions keeping in view the above constraints.
Part a)
Solution:
In order to get this code to compile, you would have to make explicit casts both ways (even converting from TEXT to int), i.e.:
int s= (int)TEXT.Bold; TEXT t= (TEXT)i;
public class Textstyle { enum TEXT { Bold=1, Underlined, Italicized, HyperLink, };
int s=(int)TEXT.Bold;
TEXT t=(TEXT)s; If(s=TEXT.Bold) { Console.writeline(“Text is Bold”); } If(s=TEXT.Underlined) { Console.writeline(“Text is Underlined”); }
Part b)
Solution:
1 ‐If(s=Text.Bold) { Console.writeline(“Text is Bold”); }
First statement will return TRUE because value for variable‘s’