Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Prog1_WS2017_18_Wienkop
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Uwe Wienkop
Prog1_WS2017_18_Wienkop
Commits
92ec7a09
Commit
92ec7a09
authored
Dec 04, 2017
by
Uwe Wienkop
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Intro Lesen&Schreiben von Textdateien
parent
53053f34
Changes
11
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
1541 additions
and
0 deletions
+1541
-0
Prog1_WS2017-18/09TextdateiSchreiben/09TextdateiSchreiben.csproj
...S2017-18/09TextdateiSchreiben/09TextdateiSchreiben.csproj
+63
-0
Prog1_WS2017-18/09TextdateiSchreiben/App.config
Prog1_WS2017-18/09TextdateiSchreiben/App.config
+6
-0
Prog1_WS2017-18/09TextdateiSchreiben/Daten.txt
Prog1_WS2017-18/09TextdateiSchreiben/Daten.txt
+1250
-0
Prog1_WS2017-18/09TextdateiSchreiben/Program.cs
Prog1_WS2017-18/09TextdateiSchreiben/Program.cs
+29
-0
Prog1_WS2017-18/09TextdateiSchreiben/Properties/AssemblyInfo.cs
...WS2017-18/09TextdateiSchreiben/Properties/AssemblyInfo.cs
+36
-0
Prog1_WS2017-18/09Textdateien/09Textdateien.csproj
Prog1_WS2017-18/09Textdateien/09Textdateien.csproj
+63
-0
Prog1_WS2017-18/09Textdateien/App.config
Prog1_WS2017-18/09Textdateien/App.config
+6
-0
Prog1_WS2017-18/09Textdateien/Program.cs
Prog1_WS2017-18/09Textdateien/Program.cs
+37
-0
Prog1_WS2017-18/09Textdateien/Properties/AssemblyInfo.cs
Prog1_WS2017-18/09Textdateien/Properties/AssemblyInfo.cs
+36
-0
Prog1_WS2017-18/09Textdateien/Textdatei.txt
Prog1_WS2017-18/09Textdateien/Textdatei.txt
+3
-0
Prog1_WS2017-18/Prog1_WS2017-18.sln
Prog1_WS2017-18/Prog1_WS2017-18.sln
+12
-0
No files found.
Prog1_WS2017-18/09TextdateiSchreiben/09TextdateiSchreiben.csproj
0 → 100644
View file @
92ec7a09
<?xml version="1.0" encoding="utf-8"?>
<Project
ToolsVersion=
"14.0"
DefaultTargets=
"Build"
xmlns=
"http://schemas.microsoft.com/developer/msbuild/2003"
>
<Import
Project=
"$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props"
Condition=
"Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')"
/>
<PropertyGroup>
<Configuration
Condition=
" '$(Configuration)' == '' "
>
Debug
</Configuration>
<Platform
Condition=
" '$(Platform)' == '' "
>
AnyCPU
</Platform>
<ProjectGuid>
{10C582AB-2484-4EC9-BEE9-99FFF732D1E4}
</ProjectGuid>
<OutputType>
Exe
</OutputType>
<AppDesignerFolder>
Properties
</AppDesignerFolder>
<RootNamespace>
_09TextdateiSchreiben
</RootNamespace>
<AssemblyName>
09TextdateiSchreiben
</AssemblyName>
<TargetFrameworkVersion>
v4.5.2
</TargetFrameworkVersion>
<FileAlignment>
512
</FileAlignment>
<AutoGenerateBindingRedirects>
true
</AutoGenerateBindingRedirects>
</PropertyGroup>
<PropertyGroup
Condition=
" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "
>
<PlatformTarget>
AnyCPU
</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|AnyCPU' "
>
<PlatformTarget>
AnyCPU
</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.Net.Http"
/>
<Reference
Include=
"System.Xml"
/>
</ItemGroup>
<ItemGroup>
<Compile
Include=
"Program.cs"
/>
<Compile
Include=
"Properties\AssemblyInfo.cs"
/>
</ItemGroup>
<ItemGroup>
<None
Include=
"App.config"
/>
</ItemGroup>
<ItemGroup>
<Content
Include=
"Daten.txt"
/>
</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
Prog1_WS2017-18/09TextdateiSchreiben/App.config
0 → 100644
View file @
92ec7a09
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<
configuration
>
<
startup
>
<
supportedRuntime
version
=
"v4.0"
sku
=
".NETFramework,Version=v4.5.2"
/>
</
startup
>
</
configuration
>
\ No newline at end of file
Prog1_WS2017-18/09TextdateiSchreiben/Daten.txt
0 → 100644
View file @
92ec7a09
This diff is collapsed.
Click to expand it.
Prog1_WS2017-18/09TextdateiSchreiben/Program.cs
0 → 100644
View file @
92ec7a09
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
using
System.IO
;
namespace
_09TextdateiSchreiben
{
class
Program
{
static
void
Main
(
string
[]
args
)
{
StreamWriter
wr
=
new
StreamWriter
(
@"..\..\Daten.txt"
);
// Öffnet die Datei zum Schreiben. Eine möglicherweise
// existierende Datei wird ohne Nachfragen überschrieben!
for
(
int
i
=
1
;
i
<=
10000
;
i
++)
{
wr
.
Write
(
$"
{
i
,
7
}
"
);
if
(
i
%
8
==
0
)
wr
.
WriteLine
();
}
wr
.
Close
();
// Schließt die Datei. Nicht vergessen!
}
}
}
Prog1_WS2017-18/09TextdateiSchreiben/Properties/AssemblyInfo.cs
0 → 100644
View file @
92ec7a09
using
System.Reflection
;
using
System.Runtime.CompilerServices
;
using
System.Runtime.InteropServices
;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[
assembly
:
AssemblyTitle
(
"09TextdateiSchreiben"
)]
[
assembly
:
AssemblyDescription
(
""
)]
[
assembly
:
AssemblyConfiguration
(
""
)]
[
assembly
:
AssemblyCompany
(
""
)]
[
assembly
:
AssemblyProduct
(
"09TextdateiSchreiben"
)]
[
assembly
:
AssemblyCopyright
(
"Copyright © 2017"
)]
[
assembly
:
AssemblyTrademark
(
""
)]
[
assembly
:
AssemblyCulture
(
""
)]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[
assembly
:
ComVisible
(
false
)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[
assembly
:
Guid
(
"10c582ab-2484-4ec9-bee9-99fff732d1e4"
)]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[
assembly
:
AssemblyVersion
(
"1.0.0.0"
)]
[
assembly
:
AssemblyFileVersion
(
"1.0.0.0"
)]
Prog1_WS2017-18/09Textdateien/09Textdateien.csproj
0 → 100644
View file @
92ec7a09
<?xml version="1.0" encoding="utf-8"?>
<Project
ToolsVersion=
"14.0"
DefaultTargets=
"Build"
xmlns=
"http://schemas.microsoft.com/developer/msbuild/2003"
>
<Import
Project=
"$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props"
Condition=
"Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')"
/>
<PropertyGroup>
<Configuration
Condition=
" '$(Configuration)' == '' "
>
Debug
</Configuration>
<Platform
Condition=
" '$(Platform)' == '' "
>
AnyCPU
</Platform>
<ProjectGuid>
{0BCC45D5-2560-4B24-BB89-B65DC3BC153B}
</ProjectGuid>
<OutputType>
Exe
</OutputType>
<AppDesignerFolder>
Properties
</AppDesignerFolder>
<RootNamespace>
_09Textdateien
</RootNamespace>
<AssemblyName>
09Textdateien
</AssemblyName>
<TargetFrameworkVersion>
v4.5.2
</TargetFrameworkVersion>
<FileAlignment>
512
</FileAlignment>
<AutoGenerateBindingRedirects>
true
</AutoGenerateBindingRedirects>
</PropertyGroup>
<PropertyGroup
Condition=
" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "
>
<PlatformTarget>
AnyCPU
</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|AnyCPU' "
>
<PlatformTarget>
AnyCPU
</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.Net.Http"
/>
<Reference
Include=
"System.Xml"
/>
</ItemGroup>
<ItemGroup>
<Compile
Include=
"Program.cs"
/>
<Compile
Include=
"Properties\AssemblyInfo.cs"
/>
</ItemGroup>
<ItemGroup>
<None
Include=
"App.config"
/>
</ItemGroup>
<ItemGroup>
<Content
Include=
"Textdatei.txt"
/>
</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
Prog1_WS2017-18/09Textdateien/App.config
0 → 100644
View file @
92ec7a09
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<
configuration
>
<
startup
>
<
supportedRuntime
version
=
"v4.0"
sku
=
".NETFramework,Version=v4.5.2"
/>
</
startup
>
</
configuration
>
\ No newline at end of file
Prog1_WS2017-18/09Textdateien/Program.cs
0 → 100644
View file @
92ec7a09
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
using
System.IO
;
namespace
_09Textdateien
{
class
Program
{
static
void
Main
(
string
[]
args
)
{
StreamReader
sr
=
new
StreamReader
(
@"..\..\Textdatei.txt"
);
// @ vor String: String ohne Escape-Zeichen
// sr.ReadLine(); Wegwerfen der ersten Zeile
int
anz
=
Convert
.
ToInt32
(
sr
.
ReadLine
());
while
(!
sr
.
EndOfStream
)
// Gibt es noch Daten in der Datei?
{
string
zeile
=
sr
.
ReadLine
();
string
[]
woerter
=
zeile
.
Split
(
'.'
);
if
(
woerter
.
Length
==
3
)
{
Console
.
WriteLine
(
zeile
);
Console
.
WriteLine
(
wort
);
//Datum d = new Datum(Convert.ToInt32(woerter[0]),
// Convert.ToInt32(woerter[1]),
// Convert.ToInt32(woerter[2]));
}
}
sr
.
Close
();
}
}
}
Prog1_WS2017-18/09Textdateien/Properties/AssemblyInfo.cs
0 → 100644
View file @
92ec7a09
using
System.Reflection
;
using
System.Runtime.CompilerServices
;
using
System.Runtime.InteropServices
;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[
assembly
:
AssemblyTitle
(
"09Textdateien"
)]
[
assembly
:
AssemblyDescription
(
""
)]
[
assembly
:
AssemblyConfiguration
(
""
)]
[
assembly
:
AssemblyCompany
(
""
)]
[
assembly
:
AssemblyProduct
(
"09Textdateien"
)]
[
assembly
:
AssemblyCopyright
(
"Copyright © 2017"
)]
[
assembly
:
AssemblyTrademark
(
""
)]
[
assembly
:
AssemblyCulture
(
""
)]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[
assembly
:
ComVisible
(
false
)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[
assembly
:
Guid
(
"0bcc45d5-2560-4b24-bb89-b65dc3bc153b"
)]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[
assembly
:
AssemblyVersion
(
"1.0.0.0"
)]
[
assembly
:
AssemblyFileVersion
(
"1.0.0.0"
)]
Prog1_WS2017-18/09Textdateien/Textdatei.txt
0 → 100644
View file @
92ec7a09
25.12.2017
26.12.2017
1.1.2018
Prog1_WS2017-18/Prog1_WS2017-18.sln
View file @
92ec7a09
...
...
@@ -65,6 +65,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "07IntroKlassen", "07IntroKl
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "08Handy", "08Handy\08Handy.csproj", "{C2DC77D3-C340-4C84-A180-21655CF5C227}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "09Textdateien", "09Textdateien\09Textdateien.csproj", "{0BCC45D5-2560-4B24-BB89-B65DC3BC153B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "09TextdateiSchreiben", "09TextdateiSchreiben\09TextdateiSchreiben.csproj", "{10C582AB-2484-4EC9-BEE9-99FFF732D1E4}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
...
...
@@ -183,6 +187,14 @@ Global
{C2DC77D3-C340-4C84-A180-21655CF5C227}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C2DC77D3-C340-4C84-A180-21655CF5C227}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C2DC77D3-C340-4C84-A180-21655CF5C227}.Release|Any CPU.Build.0 = Release|Any CPU
{0BCC45D5-2560-4B24-BB89-B65DC3BC153B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0BCC45D5-2560-4B24-BB89-B65DC3BC153B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0BCC45D5-2560-4B24-BB89-B65DC3BC153B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0BCC45D5-2560-4B24-BB89-B65DC3BC153B}.Release|Any CPU.Build.0 = Release|Any CPU
{10C582AB-2484-4EC9-BEE9-99FFF732D1E4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{10C582AB-2484-4EC9-BEE9-99FFF732D1E4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{10C582AB-2484-4EC9-BEE9-99FFF732D1E4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{10C582AB-2484-4EC9-BEE9-99FFF732D1E4}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment