Commit 3c241781 authored by O'Reilly Media, Inc.'s avatar O'Reilly Media, Inc.
Browse files

Initial commit

parents
Loading
Loading
Loading
Loading
+50 −0
Changes for Chapter 1/Chapter 1 Examples.html: 50 added lines, 0 removed lines.
Original line number Diff line number Diff line
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <title>Programming C#: Chapter 1 Examples</title>
    <link href="../ExampleStyles.css" rel="stylesheet" type="text/css" />
</head>
<body>
	<div class="example">
	    <div class="exampleHeading">Example 1-1. <span class="exampleTitle">The inevitable “Hello, world” example</span></div>
	    <div>This example is the whole of the
			<a href="HelloWorld/Program.cs" class="sourceFileRef">Program.cs</a> 
			file
	    in the <a href="HelloWorld/HelloWorld.sln">HelloWorld.sln</a> solution.</div>
    </div>

	<div class="example">
	    <div class="exampleHeading">Example 1-2. <span class="exampleTitle">Data access with LINQ</span></div>
	    <div>This example starts on line 13 of the 
			<a href="LinqDataAccess/Program.cs" class="sourceFileRef">Program.cs</a> 
			file
	    in the <a href="LinqDataAccess/LinqDataAccess.sln">LinqDataAccess.sln</a> solution.</div>
	    <div class="exampleNote">Note: This example requires SQL Server Express to be installed with the default .\SQLEXPRESS instance
	    name. It also requires the pubs example database to be installed in that instance. SQL Server Express can be downloaded
	    from the <a href="http://www.microsoft.com/express/">Microsoft/Express</a> pages (where you can also get Express editions
	    of Visual Studio, and other Microsoft tools). The pubs database is one of the SQL Server 2000 example databases (which
	    work fine on later versions of SQL Server). These can be downloaded from
	    <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=06616212-0356-46A0-8DA2-EEBC53A68034">http://www.microsoft.com/downloads/details.aspx?FamilyID=06616212-0356-46A0-8DA2-EEBC53A68034</a>.</div>
    </div>

	<div class="example">
	    <div class="exampleHeading">Example 1-3. <span class="exampleTitle">The horrors of Office interop before C# 4.0</span></div>
	    <div>This example starts on line 10 of the 
			<a href="HorribleOfficeInterop/Program.cs" class="sourceFileRef">Program.cs</a> 
			file
	    in the <a href="HorribleOfficeInterop/HorribleOfficeInterop.sln">HorribleOfficeInterop.sln</a> solution.</div>
	    <div class="exampleNote">Note: This example requires Microsoft Word to be installed, because it illustrates how to control
	    Word from C# using old-style COM Interop.</div>
	</div>
	
	<div class="example">
	    <div class="exampleHeading">Example 1-4. <span class="exampleTitle">Office interop with C# 4.0</span></div>
	    <div>This example starts on line 9 of the 
			<a href="NewOfficeInterop/Program.cs" class="sourceFileRef">Program.cs</a> 
			file
	    in the <a href="NewOfficeInterop/NewOfficeInterop.sln">NewOfficeInterop.sln</a> solution.</div>
	    <div class="exampleNote">Note: This example requires Microsoft Word to be installed, because it illustrates how to control
	    Word from using new C# 4 language features.</div>
    </div>
</body>
</html>
+57 −0
Changes for Chapter 1/HelloWorld/HelloWorld.csproj: 57 added lines, 0 removed lines.
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
    <ProductVersion>8.0.30703</ProductVersion>
    <SchemaVersion>2.0</SchemaVersion>
    <ProjectGuid>{0678F69F-7A7B-4D5B-AFB0-98135B983EC0}</ProjectGuid>
    <OutputType>Exe</OutputType>
    <AppDesignerFolder>Properties</AppDesignerFolder>
    <RootNamespace>HelloWorld</RootNamespace>
    <AssemblyName>HelloWorld</AssemblyName>
    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
    <TargetFrameworkProfile>Client</TargetFrameworkProfile>
    <FileAlignment>512</FileAlignment>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
    <PlatformTarget>x86</PlatformTarget>
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>bin\Debug\</OutputPath>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
    <PlatformTarget>x86</PlatformTarget>
    <DebugType>pdbonly</DebugType>
    <Optimize>true</Optimize>
    <OutputPath>bin\Release\</OutputPath>
    <DefineConstants>TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="System" />
    <Reference Include="System.Core" />
    <Reference Include="System.Xml.Linq" />
    <Reference Include="System.Data.DataSetExtensions" />
    <Reference Include="Microsoft.CSharp" />
    <Reference Include="System.Data" />
    <Reference Include="System.Xml" />
  </ItemGroup>
  <ItemGroup>
    <Compile Include="Program.cs" />
    <Compile Include="Properties\AssemblyInfo.cs" />
  </ItemGroup>
  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
       Other similar extension points exist, see Microsoft.Common.targets.
  <Target Name="BeforeBuild">
  </Target>
  <Target Name="AfterBuild">
  </Target>
  -->
</Project>
 No newline at end of file
+3 −0
Changes for Chapter 1/HelloWorld/HelloWorld.csproj.user: 3 added lines, 0 removed lines.
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project>
 No newline at end of file
+20 −0
Changes for Chapter 1/HelloWorld/HelloWorld.sln: 20 added lines, 0 removed lines.
Original line number Diff line number Diff line

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HelloWorld", "HelloWorld.csproj", "{0678F69F-7A7B-4D5B-AFB0-98135B983EC0}"
EndProject
Global
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
		Debug|x86 = Debug|x86
		Release|x86 = Release|x86
	EndGlobalSection
	GlobalSection(ProjectConfigurationPlatforms) = postSolution
		{0678F69F-7A7B-4D5B-AFB0-98135B983EC0}.Debug|x86.ActiveCfg = Debug|x86
		{0678F69F-7A7B-4D5B-AFB0-98135B983EC0}.Debug|x86.Build.0 = Debug|x86
		{0678F69F-7A7B-4D5B-AFB0-98135B983EC0}.Release|x86.ActiveCfg = Release|x86
		{0678F69F-7A7B-4D5B-AFB0-98135B983EC0}.Release|x86.Build.0 = Release|x86
	EndGlobalSection
	GlobalSection(SolutionProperties) = preSolution
		HideSolutionNode = FALSE
	EndGlobalSection
EndGlobal
+7 −0
Changes for Chapter 1/HelloWorld/Program.cs: 7 added lines, 0 removed lines.
Original line number Diff line number Diff line
class Program
{
    static void Main()
    {
        System.Console.WriteLine("Hello, world");
    }
}
 No newline at end of file
Loading