Enter your Sign on user name and password.

Forgot password?
Sign In | Subscribe
Start learning today, and be successful in your academic & professional career. Start Today!

Use Chrome browser to play professor video
John Snape

John Snape

Declaring Variables

Slide Duration:

Table of Contents

I. Introduction
Introduction Hello World

15m 5s

Declaring Variables

47m 26s

Accepting Input

13m 17s

Operators, Expressions and Statements

40m 8s

Program Flow Control

31m 44s

Iterations & Looping

24m 43s

Working with Strings

53m 6s

Formatting Strings for Output

16m 24s

Helper Methods

28m 40s

Enumerations & Structures

8m 39s

Commenting & Documenting Code

8m 48s

Arrays, Stacks, Queues & Dictionaries

41m 29s

Generic Lists & Collections

14m 24s

Variable Scope

10m 38s

Reading & Writing Files

25m 10s

Dates & Times

12m 22s

Random Numbers

5m 29s

Handling Exceptions

14m 45s

Environment Variables

8m 21s

Command Line Arguments

10m 43s

The CD Inventory Program So Far

34m 16s

II. Object Oriented Programming
Introduction to Object Oriented Programming

1h 2m 20s

Understanding & Creating Classes

26m 6s

Understanding Interfaces & Abstract Classes

20m 12s

Static vs. Instance Members

16m 24s

Understanding Inheritance

32m 59s

Understanding Polymorphism

14m 58s

Understanding Delegates

22m

Reading & Understanding Code

35m 49s

Creating a Data Type

29m 21s

Unified Modeling Language & Class Diagrams

23m 5s

The CD Inventory Program Upgraded with Classes

20m 33s

III. GUI Programming
Introduction to GUI Programming

39m 19s

All About Forms

40m 7s

Handling Form Events

15m 22s

Informational Controls

27m 44s

Command Controls

36m 23s

Grouping Controls

26m 44s

Text Editing Controls

25m 7s

List Selection Controls

37m 45s

Setting Options Controls

21m 20s

Dialog Controls

22m 21s

Graphic Display Controls

35m 37s

Date Setting Controls

15m 53s

Other Controls

17m 33s

Using the Clipboard

7m 28s

Sending Email

25m 16s

Some Sample Programs

38m 31s

Our CD Inventory Program Upgraded with Forms

15m 16s

IV. Databases
Introduction to Databases

34m 7s

SQL Server Management Studio & Northwind Database

8m 11s

SELECT Statement

31m 24s

UPDATE & DELETE Statements

16m 56s

INSERT Statement

11m 48s

Creating a Database from Scratch

44m 54s

Querying Lists with LINQ

20m 42s

Using Databound Controls

14m 22s

Our CD Inventory Program Upgraded with a Database

10m 50s

V. Conclusion
Where to Go from Here

19m 48s

Loading...
This is a quick preview of the lesson. For full access, please Log In or Sign up.
For more information, please see full course syllabus of C#
  • Discussion

  • Study Guides

  • Table of Contents

Lecture Comments (5)

0 answers

Post by Ehab Issa on August 3, 2015

Dear John,
the samples you gave regarding Nullable are wrong , for example
Console.Write(aVar.ToString()) ; You have not added the parentheses which why you always have an error , you can not use nullable string because its of reference type and you can console write a null integer which will be nothing on screen. please Sir , you need to give much care

1 answer

Last reply by: John Snape
Thu Feb 4, 2016 12:12 AM

Post by Salman Khan on June 22, 2015

I have been struggling for almost 3-4 days with the concept of floating-point numbers. It involves really hard mathematics and we should also understand fixed-point numbers as well. it is very hard to do. I've been trying to go through different sources, like the book "Computer Organization and Architecture" by William Stallings. Why this topic was just touched so briefly upon? It is not so trivial and is very hard.  
P.S. i'm not that good in Mathematics, just finished A level high school.

1 answer

Last reply by: John Snape
Thu Mar 26, 2015 10:52 AM

Post by Keith Lashley on March 26, 2015

My Visual Studio claims that my projects were not loaded correctly when I try to open them.  What is wrong?  Can you help me please.

Declaring Variables

  • The standard variable declaration statement is:
    • [datatype] variable = [value];
  • Value types hold their data directly
  • Reference types only hold a pointer to the actual data somewhere else in memory
  • All built-in numeric types are value types
  • Use a data type with enough precision for the work you need to do
  • You have to give some value to a variable before you use it or you will get an error
  • Constants never change during the program execution
  • Constants can be any data type
  • Usually all uppercase so they are easily seen when scanning code
  • Implicit conversions are always allowed for widening conversions (where the source data type is less precise than the destination data type)
  • Explicit conversions are for narrowing conversions
  • Null means "never entered"
  • Use ? after the datatype in the declaration for nullable variables
  • Boolean is a "Yes or No"/"True or False" type variable
  • False always converts to/from zero
  • Although discouraged, you can use a reserved word for a variable name by always starting it with @
    Educator®

    Please sign in for full access to this lesson.

    Sign-InORCreate Account

    Enter your Sign-on user name and password.

    Forgot password?

    Start Learning Now

    Our free lessons will get you started (Adobe Flash® required).
    Get immediate access to our entire library.

    Sign up for Educator.com

    Membership Overview

    • Unlimited access to our entire library of courses.
    • Search and jump to exactly what you want to learn.
    • *Ask questions and get answers from the community and our teachers!
    • Practice questions with step-by-step solutions.
    • Download lesson files for programming and software training practice.
    • Track your course viewing progress.
    • Download lecture slides for taking notes.

    Use this form or mail us to .

    For support articles click here.