03.01.2015 Views

Complete set: Intro to C - Bill Buchanan

Complete set: Intro to C - Bill Buchanan

Complete set: Intro to C - Bill Buchanan

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Class1.cs<br />

Class1.cs<br />

using System;<br />

using System;<br />

namespace Module01_01<br />

namespace Module01_01<br />

{<br />

{<br />

/// <br />

/// <br />

/// Summary description for Class1.<br />

/// Summary description for Class1.<br />

/// <br />

/// <br />

class Class1<br />

class Class1<br />

{<br />

{<br />

/// <br />

/// <br />

/// The main entry point for the application.<br />

/// The main entry point for the application.<br />

/// <br />

/// <br />

static void Main(string[] args)<br />

static void Main(string[] args)<br />

{<br />

{<br />

//<br />

//<br />

// TODO: Add code <strong>to</strong> start application here<br />

// TODO: Add code <strong>to</strong> start application here<br />

System.Console.WriteLine("Agilent<br />

System.Console.WriteLine("Agilent<br />

Course");<br />

Course");<br />

System.Console.ReadLine();<br />

System.Console.ReadLine();<br />

}<br />

}<br />

}<br />

}<br />

}<br />

}<br />

Figure 1.11: CS file<br />

Along with this, most projects contain an AssemblyInfo class file, an example of<br />

which is shown in Figure 1.12. .NET uses assembly <strong>to</strong> represent a single unit. An<br />

assembly, <strong>to</strong> be covered in a future unit, is a collection of files that appear as a single<br />

unit, such as a single DLL or an EXE. Along with class files, most projects contain an<br />

icon file, which is associated with the executable program. An example of an icon is<br />

shown in Figure 1.13.<br />

<strong>Intro</strong>duction <strong>to</strong> .NET<br />

AssemblyInfo.cs<br />

AssemblyInfo.cs<br />

using System.Reflection;<br />

using<br />

using<br />

System.Runtime.CompilerServices;<br />

System.Reflection;<br />

using System.Runtime.CompilerServices;<br />

//<br />

//<br />

//<br />

General Information about an assembly is controlled through the following<br />

//<br />

//<br />

<strong>set</strong><br />

General<br />

of attributes.<br />

Information<br />

Change<br />

about<br />

these<br />

an assembly<br />

attribute<br />

is<br />

values<br />

controlled<br />

<strong>to</strong> modify<br />

through<br />

the<br />

the<br />

information<br />

following<br />

//<br />

//<br />

associated<br />

<strong>set</strong> of attributes.<br />

with an assembly.<br />

Change these attribute values <strong>to</strong> modify the information<br />

//<br />

// associated with an assembly.<br />

[assembly:<br />

//<br />

AssemblyTitle("")]<br />

[assembly:<br />

[assembly:<br />

AssemblyDescription("")]<br />

AssemblyTitle("")]<br />

[assembly:<br />

[assembly:<br />

AssemblyConfiguration("")]<br />

AssemblyDescription("")]<br />

[assembly:<br />

[assembly:<br />

AssemblyCompany("")]<br />

AssemblyConfiguration("")]<br />

[assembly:<br />

[assembly:<br />

AssemblyProduct("")]<br />

AssemblyCompany("")]<br />

[assembly:<br />

[assembly:<br />

AssemblyCopyright("")]<br />

AssemblyProduct("")]<br />

[assembly:<br />

[assembly:<br />

AssemblyTrademark("")]<br />

AssemblyCopyright("")]<br />

[assembly:<br />

[assembly:<br />

AssemblyCulture("")]<br />

AssemblyTrademark("")]<br />

[assembly: AssemblyCulture("")]<br />

//<br />

//<br />

//<br />

Version information for an assembly consists of the following four values:<br />

//<br />

// Version information for an assembly consists of the following four values:<br />

//<br />

//<br />

Major Version<br />

//<br />

//<br />

Minor<br />

Major<br />

Version<br />

Version<br />

//<br />

//<br />

Build<br />

Minor<br />

Number<br />

Version<br />

//<br />

//<br />

Revision<br />

Build Number<br />

//<br />

// Revision<br />

//<br />

//<br />

You can specify all the values or you can default the Revision and Build<br />

// You<br />

Numbers<br />

can specify all the values or you can default the Revision and Build<br />

// by using<br />

Numbers<br />

the '*' as shown below:<br />

// by using the '*' as shown below:<br />

[assembly: AssemblyVersion("1.0.*")]<br />

[assembly: AssemblyVersion("1.0.*")]<br />

[assembly: AssemblyDelaySign(false)]<br />

[assembly:<br />

[assembly:<br />

AssemblyKeyFile("")]<br />

AssemblyDelaySign(false)]<br />

[assembly:<br />

[assembly:<br />

AssemblyKeyName("")]}<br />

AssemblyKeyFile("")]<br />

[assembly: AssemblyKeyName("")]}<br />

Figure 1.12: AssemblyInfo class file<br />

Agilent .NET Course: <strong>Intro</strong>duction 14

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!