Share
Explore BrainMass

C#

C# is the result of Microsoft's .NET initiative telling Anders Hejlsberg that they needed a new object-orientated programming language. As with C++, the decision was made to have this new language be an 'upgrading' of sorts for C, mainly by tailoring that procedural language into an object-orientated one, and like C++, the name C# (pronounced 'C sharp') is a notation joke, only here it is referring to the sharp in musical notation lifting a note's pitch by one semitone instead of programming notation's incremental operator. The main difference between the two languages is that C# is more high-level, taking care of much memory management, etc. behind the scenes (somewhat like Java). This makes it faster to develop in for some, though performance is almost always slower than a program written in C or C++. 

Anders Hejlsberg. Image Credit: DBegley.

Since its inception and creation, C# has been approved  by Ecma and ISO as an industry standard, and has gained popularity for its versatility, being able to code everything from websites to console games, yet its older sibling C++ is still in more widespread use. However, C++ does have the advantage of being older so one cannot take these levels at face value. In addition to its versatility, C# boasts strong typing, imperative, declarative and functional programming disciplines. C# makes use of the following syntax regularly: semicolons, curly braces, variable assignments using equal signs and squared brackets.

Thanks to some striking similarities in syntax with other languages such as C, C++ and Java, James Gosling, who created Java and Bill Joy, co-founder of Sun Microsystems called the original C# an imitation of Java. However, since the release of the new Java upgrades and new C# upgrades, the languages have diverged in different directions. C# has gone through five releases in its lifetime so far, with the last one occurring in June 2013 as of the time of writing.

Random number based on lower and upper range input

i really have no clue where to start. write a console program that will generate a random number based on lower and upper range inputs. Create a console program where you will implement variables that are needed for this program and will implement the code within Main and any static methods that are called. The program will ta

Find highest, lowest, and average temperature of the month

need help writing a program in C# with the output Please enter the average temperature for week 1 of the month: 11 Please enter the average temperature for week 2 of the month: 22 Please enter the average temperature for week 3 of the month: 33 Please enter the average temperature for week 4 of the month: 44 The l

Grade Calculation using functions in C#

please use my attached code to expand upon. --------------------------------------------------------------------------------------------------------------------------------- 18.6. Homework: Grade Calculation from Individual Scores¶ In the previous assignment, we calculated grades based on a memorized overall grade within e

Grade Calculation in C#

Program Summary Our first program is based on a common task that every course professor/instructor needs to do: make grades. In any given course, there is a grading scale and a set of categories. Here is sample output from two runs of the program. The only data entered by the user are show in boldface for illustration here.

C# Database Handling

I need assistance creating a database using C# for a Record Collection. I need a screen to add and remove items, changing entries, and to search. I can add entries, and populate it, just need help getting the core framework set-up for this database, as I am having difficulties, and will be applying modifications myself later

C# Programming and String Variable

Hi, I need some help with a c# study guide and have a question: Assuming the string variable myvar contains the string literal "C# Programming", what will be written to the console for the following statements: (a) Console.Write(myvar.IndexOf("Prog'',3); (b) Console.Write(myvar.LastIndexOfAny('d'); (c) Console.Write(m

C# Doubly Linked List

Hi. I need some help with a c# doubly linked list program. I previously had code for a doubly linked list but this a little different in the way it should be implemented. 1. Using C# generics, write a doubly-linked list that can store any type of data. Do NOT use a built-in C# data structure or class (or any other pre-made i

StringBuilder and Insert Method

The StringBuilder class defines an overloaded Insert method which inserts the string representation of an object into a StringBuilder. What happens to the length, capacity and existing contents of the StringBuilder object when this method is used?

C# Programming File Info Class

Create a file that contains your favorite movie quote. Use a text editor such as Notepad and save the file as Quote.txt. Copy the file contents and paste them into a word-processing program such as Word. Save the file as Quote.doc. Write console application that displays the sizes of the two files as well as the ratio of the

C# console application to handle indexoutofrange exception.

Write a C# console application in which you declare an array of five integers and store five values in the array. Write a try block in which you place a loop that attempts to access each element of the array, incrementing a subscript from 0 to 10. Create a catch block that catches the eventual IndexOutOfRangeException; within

How to eliminate a break statement from a for loop

Using the following code as an example, explain how, in general, one can remove the break statement and replace it with "better" code: int count; for (count = 1; count <= 10 ; ++count) { if (count == 5) break; // LINE 5 }; Suppose we replace the line labeled "LINE 5" with a continue statement. How would you replace the

Dr. Bradbury's Circus of Total Evil Program

Hi. im stuck on a program here. I will post what I have. but I cant seem to get any further due to lack of instruction on Interfaces and also implementing other classes in the main program. I will also post instructions. we are to use console app. and not windows forms just yet.

C# Turtle Graphics

im stuck here on this turtle graphics program. basically it just is not working correctly. I will upload instructions with what I have. also...on the program it says I need a #7 to clear. I don't have that. I will also include a Microsoft word document with the source code in it. --- CIS365 Programming Assignment 3

C# list all Pythagorean triples

A right triangle can have sides whose lengths are all integers. The set of these integer values for the lengths of the sides of a right triangle is called a Pythagorean triple. Note that sum of the squares of two of the sides must be equal to square of the hypotenuse. Write an application in C++ to find all of the triples for va

Check Book Organizer in C#

I have attached a zip file of what I have completed so far in this checkbook organizer program. I need to edit this program so that the transactions entered into the checkbook application are able to be double clicked and view the details from a separate window. I want the user to be able to view the complete transaction details

C# Application for Calculating a Hypotenuse

Develop a C# console application that computes the hypotenuse of a right triangle. The computation of the hypotenuse of a right triangle is based on the Pythagorean Theorem: c2 = a2 + b2 and the hypotenuse, c ("long side") of the triangle can be computed with the formula the hypotenuse is equal to the square root of the side a s

Classes and Inheritance: C#

Here is what I have and what I need. I have created a class called Employee that includes the attributes of employees of an organization. I have added more classes that inherit from the employees class. What I need is to have the program ask a user to enter attributes for members of the subclass on a single form. I need to inclu

Writing Programs in VB or C#

I am working on a very basic program for a small town library. The program is intended to help people who visit the library to look up books. They can look up the author or the title and the program will tell them where to find the book. I can write this program in VB or C#. What I need to do is to weigh what the pros and cons a

Code Reuse Objects

What is an example of how one would re-use a C# object. At the same time, one must avoid code plagiarism. How does one reconcile the two? Describe some benefits of code citations in addition to avoiding plagiarism.

Test line in C

TestLineNumbering that accepts one command-line argument, the name of the file. Your code should verify that a single command-line argument was specified. Declare a variable that holds a File object which is initialized from the file named in the first command-line argument. Within a try-catch block, create: - a buffered,

C#

Thank you for allowing me to see better with your guidance.

Assistance

I would like your assistance in resolving my issue. Any and all the guidance you provide will be greatly appreciated.

Creating C# and Java Programs: Example Application Problems

Problem 1: a. Design and implement a C# program that will gather floating point numbers and determine the sum and average of the data entered. The program should use separate methods for inputting the data, calculating the sum, calculating the average, and displaying the results. A sentinel value should be used to indicate th

C# assignment - Order class

Create a class named Order that performs order processing of a single item that sells for $19.99 each. Create 4 Order class fields: order number, customer name, quantity ordered, and total price. Create public accessors for each field except total price. Create an Order class constructor that takes parameters for all of t

help writing a windows form program C#

Write a Windows Form program for a Nina's Cookie Source. The user will be able to select from at least three types of cookies, each with a different price per dozen. The user can select 1/2, 1, 2, or 3 dozen cookies. Adjust the final displayed price as the user chooses a different cookie types and/or quantities.

Create a Windows Form Application in C# for a car rental company.

Create a Windows Form Application in C# as per the following guidelines. 1. Create a Form for a car rental company and set the form text property to Car Rental and the form backcolor to GradientInactiveCaption. 2. Allow the user to select from a list of car styles: Compact, Standard, or Luxury. 3. Use a calendar that de