Initial commit
This commit is contained in:
36
12.1-ReadFile/12.1-ReadFile.csproj
Normal file
36
12.1-ReadFile/12.1-ReadFile.csproj
Normal file
@@ -0,0 +1,36 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
|
||||
<ProjectGuid>{DA9BCA48-DBB9-4488-98F2-87356CE4715F}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>ReadFile</RootNamespace>
|
||||
<AssemblyName>12.1-ReadFile</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug</OutputPath>
|
||||
<DefineConstants>DEBUG;</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<ItemGroup>
|
||||
<Compile Include="ReadFile.cs" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
17
12.1-ReadFile/12.1-ReadFile.sln
Normal file
17
12.1-ReadFile/12.1-ReadFile.sln
Normal file
@@ -0,0 +1,17 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2012
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "12.1-ReadFile", "12.1-ReadFile.csproj", "{DA9BCA48-DBB9-4488-98F2-87356CE4715F}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|x86 = Debug|x86
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{DA9BCA48-DBB9-4488-98F2-87356CE4715F}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{DA9BCA48-DBB9-4488-98F2-87356CE4715F}.Debug|x86.Build.0 = Debug|x86
|
||||
{DA9BCA48-DBB9-4488-98F2-87356CE4715F}.Release|x86.ActiveCfg = Release|x86
|
||||
{DA9BCA48-DBB9-4488-98F2-87356CE4715F}.Release|x86.Build.0 = Release|x86
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
12
12.1-ReadFile/12.1-ReadFile.userprefs
Normal file
12
12.1-ReadFile/12.1-ReadFile.userprefs
Normal file
@@ -0,0 +1,12 @@
|
||||
<Properties StartupItem="12.1-ReadFile.csproj">
|
||||
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|x86" />
|
||||
<MonoDevelop.Ide.Workbench ActiveDocument="ReadFile.cs">
|
||||
<Files>
|
||||
<File FileName="ReadFile.cs" Line="10" Column="33" />
|
||||
</Files>
|
||||
</MonoDevelop.Ide.Workbench>
|
||||
<MonoDevelop.Ide.DebuggingService.Breakpoints>
|
||||
<BreakpointStore />
|
||||
</MonoDevelop.Ide.DebuggingService.Breakpoints>
|
||||
<MonoDevelop.Ide.DebuggingService.PinnedWatches />
|
||||
</Properties>
|
||||
19
12.1-ReadFile/ReadFile.cs
Normal file
19
12.1-ReadFile/ReadFile.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
class ReadFile {
|
||||
public static void Main() {
|
||||
StreamReader reader = new StreamReader("../../exempel.txt");
|
||||
int lineNumber = 0;
|
||||
string line;
|
||||
|
||||
// Läsa in alla rader i en fil
|
||||
do {
|
||||
line = reader.ReadLine();
|
||||
lineNumber++;
|
||||
Console.WriteLine("Line:{0}: {1}", lineNumber, line);
|
||||
} while(line != null);
|
||||
|
||||
reader.Close();
|
||||
}
|
||||
}
|
||||
BIN
12.1-ReadFile/bin/Debug/12.1-ReadFile.exe
Normal file
BIN
12.1-ReadFile/bin/Debug/12.1-ReadFile.exe
Normal file
Binary file not shown.
BIN
12.1-ReadFile/bin/Debug/12.1-ReadFile.pdb
Normal file
BIN
12.1-ReadFile/bin/Debug/12.1-ReadFile.pdb
Normal file
Binary file not shown.
4
12.1-ReadFile/exempel.txt
Normal file
4
12.1-ReadFile/exempel.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
Anna
|
||||
Bertil
|
||||
Catrin
|
||||
David
|
||||
@@ -0,0 +1,5 @@
|
||||
C:\Users\Crille\CSharp\12.1-ReadFile\bin\Debug\12.1-ReadFile.exe
|
||||
C:\Users\Crille\CSharp\12.1-ReadFile\bin\Debug\12.1-ReadFile.pdb
|
||||
C:\Users\Crille\CSharp\12.1-ReadFile\obj\x86\Debug\12.1-ReadFile.csprojResolveAssemblyReference.cache
|
||||
C:\Users\Crille\CSharp\12.1-ReadFile\obj\x86\Debug\12.1-ReadFile.exe
|
||||
C:\Users\Crille\CSharp\12.1-ReadFile\obj\x86\Debug\12.1-ReadFile.pdb
|
||||
Binary file not shown.
BIN
12.1-ReadFile/obj/x86/Debug/12.1-ReadFile.exe
Normal file
BIN
12.1-ReadFile/obj/x86/Debug/12.1-ReadFile.exe
Normal file
Binary file not shown.
BIN
12.1-ReadFile/obj/x86/Debug/12.1-ReadFile.pdb
Normal file
BIN
12.1-ReadFile/obj/x86/Debug/12.1-ReadFile.pdb
Normal file
Binary file not shown.
Reference in New Issue
Block a user