Initial commit

This commit is contained in:
2018-02-22 23:01:00 +01:00
commit 8a754080ba
378 changed files with 2723 additions and 0 deletions

View 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>{1D6A3D77-7186-4243-A742-05149B1FB561}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>StringReverse</RootNamespace>
<AssemblyName>10.7-StringReverse</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="StringReverse.cs" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,17 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "10.7-StringReverse", "10.7-StringReverse.csproj", "{1D6A3D77-7186-4243-A742-05149B1FB561}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x86 = Debug|x86
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{1D6A3D77-7186-4243-A742-05149B1FB561}.Debug|x86.ActiveCfg = Debug|x86
{1D6A3D77-7186-4243-A742-05149B1FB561}.Debug|x86.Build.0 = Debug|x86
{1D6A3D77-7186-4243-A742-05149B1FB561}.Release|x86.ActiveCfg = Release|x86
{1D6A3D77-7186-4243-A742-05149B1FB561}.Release|x86.Build.0 = Release|x86
EndGlobalSection
EndGlobal

View File

@@ -0,0 +1,12 @@
<Properties StartupItem="10.7-StringReverse.csproj">
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|x86" />
<MonoDevelop.Ide.Workbench ActiveDocument="StringReverse.cs">
<Files>
<File FileName="StringReverse.cs" Line="22" Column="18" />
</Files>
</MonoDevelop.Ide.Workbench>
<MonoDevelop.Ide.DebuggingService.Breakpoints>
<BreakpointStore />
</MonoDevelop.Ide.DebuggingService.Breakpoints>
<MonoDevelop.Ide.DebuggingService.PinnedWatches />
</Properties>

View File

@@ -0,0 +1,30 @@
using System;
class StringReverse {
public static void Main() {
string s = "Norrsken";
string reversed;
reversed = StupidReverse(s);
Console.WriteLine("StupidReverse: " + reversed);
reversed = GoodReverse(s);
Console.WriteLine("GoodReverse: " + reversed);
}
static string StupidReverse(string text) {
char[] charArray = text.ToCharArray();
string reverse = String.Empty;
for (int i = charArray.Length - 1; i >= 0; i--) {
reverse += charArray[i];
}
return reverse;
}
static string GoodReverse(string text) {
char[] charArray = text.ToCharArray();
Array.Reverse(charArray);
return new string(charArray);
}
}

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,5 @@
C:\Users\Crille\CSharp\10.7-StringReverse\bin\Debug\10.7-StringReverse.exe
C:\Users\Crille\CSharp\10.7-StringReverse\bin\Debug\10.7-StringReverse.pdb
C:\Users\Crille\CSharp\10.7-StringReverse\obj\x86\Debug\10.7-StringReverse.csprojResolveAssemblyReference.cache
C:\Users\Crille\CSharp\10.7-StringReverse\obj\x86\Debug\10.7-StringReverse.exe
C:\Users\Crille\CSharp\10.7-StringReverse\obj\x86\Debug\10.7-StringReverse.pdb