Skip to content

Instantly share code, notes, and snippets.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PlayerCreator
{
class Program
{
@RMcGee
RMcGee / 7
Created December 9, 2013 22:47
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PlayerCreator
{
class Program
{
<!doctype html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="stylesheets/style.css" />
<!--[if lt IE 9]>
<script src="dist/html5shiv.js"></script>
<![endif]-->
<!--[if lt IE 9]>
<script src="dist/html5shiv.js"></script>
<![endif]-->
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Exceptions
{
class Program
{
static void Main(string[] args)
Employee[] employees = new Employee[100];
employees [0] = new Employee("Reid", "McGee", 651864324, 22, 'M');
employees [1] = new Employee("Mike", "Besney", 651864324, 55, 'M', 30);
employees [1].FirstName = "Florence";
employees[1].Gender = 'F';
for (Int32 n = 0; n < 2; n++)
Console.WriteLine(employees[n].LastName + employees[n].FirstName + " " + employees[n].Sin + " " +
employees[n].Age + " " + employees[n].Gender + " " + employees[n].YearsService + " " +
employees[n].IsEligibleToRetire());
@RMcGee
RMcGee / Objects
Last active December 26, 2015 04:19
class Employee
{
//Private Member Data
private String _firstName;
private String _lastName;
private Int32 _sin;
private Int32 _age;
private Char _gender;
private Int32 _yearsService;
.clearfix:after
{
content: ".";
visibility: hidden;
display: block;
height: 0;
clear: both;
}
static void Main(string[] args)
{
//The MAXPLAYERS constant is the physical table size
const Int32 MAXPLAYERS = 23;
//Declare the player tables
Int32[] playerNumbers = new Int32[MAXPLAYERS];
String[] playerLastNames = new String[MAXPLAYERS];
Int32[] playerPoints = new Int32[MAXPLAYERS];
@RMcGee
RMcGee / Modularity
Last active December 24, 2015 08:39
static void Main(string[] args)
{
Char menuItem;
Console.WriteLine("Welcome to ze calculator");
menuItem = GetMenuItem();
while (menuItem != 'X')
{
ProcessMenuItem(menuItem);
menuItem = GetMenuItem();
}// while