Initial commit
This commit is contained in:
commit
8a754080ba
378 files changed
+2723
No files matched your search
@@ -0,0 +1,2 @@
|
|||||||
|
# Auto detect text files and perform LF normalization
|
||||||
|
* text=auto
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
class Hello {
|
||||||
|
public static void Main() {
|
||||||
|
Console.WriteLine("Hello World in C#!");
|
||||||
|
}
|
||||||
|
}
|
||||||
Binary file not shown.
@@ -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>{52E355AA-7AE9-4E3A-A678-60BAC45D5EFF}</ProjectGuid>
|
||||||
|
<OutputType>Exe</OutputType>
|
||||||
|
<RootNamespace>HelloWorld</RootNamespace>
|
||||||
|
<AssemblyName>1.2-HelloWorld</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="HelloWorld.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio 2012
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "1.2-HelloWorld", "1.2-HelloWorld.csproj", "{52E355AA-7AE9-4E3A-A678-60BAC45D5EFF}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|x86 = Debug|x86
|
||||||
|
Release|x86 = Release|x86
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{52E355AA-7AE9-4E3A-A678-60BAC45D5EFF}.Debug|x86.ActiveCfg = Debug|x86
|
||||||
|
{52E355AA-7AE9-4E3A-A678-60BAC45D5EFF}.Debug|x86.Build.0 = Debug|x86
|
||||||
|
{52E355AA-7AE9-4E3A-A678-60BAC45D5EFF}.Release|x86.ActiveCfg = Release|x86
|
||||||
|
{52E355AA-7AE9-4E3A-A678-60BAC45D5EFF}.Release|x86.Build.0 = Release|x86
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
<Properties StartupItem="1.2-HelloWorld.csproj">
|
||||||
|
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|x86" />
|
||||||
|
<MonoDevelop.Ide.Workbench ActiveDocument="HelloWorld.cs">
|
||||||
|
<Files>
|
||||||
|
<File FileName="HelloWorld.cs" Line="6" Column="3" />
|
||||||
|
</Files>
|
||||||
|
</MonoDevelop.Ide.Workbench>
|
||||||
|
<MonoDevelop.Ide.DebuggingService.Breakpoints>
|
||||||
|
<BreakpointStore />
|
||||||
|
</MonoDevelop.Ide.DebuggingService.Breakpoints>
|
||||||
|
<MonoDevelop.Ide.DebuggingService.PinnedWatches />
|
||||||
|
</Properties>
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
class HelloWorld {
|
||||||
|
public static void Main() {
|
||||||
|
Console.WriteLine("Hello World in MonoDevelop");
|
||||||
|
}
|
||||||
|
}
|
||||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,5 @@
|
|||||||
|
C:\Users\Crille\CSharp\1.2-HelloWorld\bin\Debug\1.2-HelloWorld.exe
|
||||||
|
C:\Users\Crille\CSharp\1.2-HelloWorld\bin\Debug\1.2-HelloWorld.pdb
|
||||||
|
C:\Users\Crille\CSharp\1.2-HelloWorld\obj\x86\Debug\1.2-HelloWorld.csprojResolveAssemblyReference.cache
|
||||||
|
C:\Users\Crille\CSharp\1.2-HelloWorld\obj\x86\Debug\1.2-HelloWorld.exe
|
||||||
|
C:\Users\Crille\CSharp\1.2-HelloWorld\obj\x86\Debug\1.2-HelloWorld.pdb
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
@@ -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>{B3355BB9-FB23-4D06-B7ED-C123401C08A2}</ProjectGuid>
|
||||||
|
<OutputType>Exe</OutputType>
|
||||||
|
<RootNamespace>StringPrint</RootNamespace>
|
||||||
|
<AssemblyName>10.1-StringPrint</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="StringPrint.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio 2012
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "10.1-StringPrint", "10.1-StringPrint.csproj", "{B3355BB9-FB23-4D06-B7ED-C123401C08A2}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|x86 = Debug|x86
|
||||||
|
Release|x86 = Release|x86
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{B3355BB9-FB23-4D06-B7ED-C123401C08A2}.Debug|x86.ActiveCfg = Debug|x86
|
||||||
|
{B3355BB9-FB23-4D06-B7ED-C123401C08A2}.Debug|x86.Build.0 = Debug|x86
|
||||||
|
{B3355BB9-FB23-4D06-B7ED-C123401C08A2}.Release|x86.ActiveCfg = Release|x86
|
||||||
|
{B3355BB9-FB23-4D06-B7ED-C123401C08A2}.Release|x86.Build.0 = Release|x86
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
<Properties StartupItem="10.1-StringPrint.csproj">
|
||||||
|
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|x86" />
|
||||||
|
<MonoDevelop.Ide.Workbench ActiveDocument="StringPrint.cs">
|
||||||
|
<Files>
|
||||||
|
<File FileName="StringPrint.cs" Line="10" Column="3" />
|
||||||
|
</Files>
|
||||||
|
</MonoDevelop.Ide.Workbench>
|
||||||
|
<MonoDevelop.Ide.DebuggingService.Breakpoints>
|
||||||
|
<BreakpointStore />
|
||||||
|
</MonoDevelop.Ide.DebuggingService.Breakpoints>
|
||||||
|
<MonoDevelop.Ide.DebuggingService.PinnedWatches />
|
||||||
|
</Properties>
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
class StringPrint {
|
||||||
|
public static void Main() {
|
||||||
|
string message = "This is just a normal string.";
|
||||||
|
|
||||||
|
Console.WriteLine("Message: " + message);
|
||||||
|
Console.WriteLine("Message: {0}", message);
|
||||||
|
Console.WriteLine("Langd: {0}", message.Length);
|
||||||
|
|
||||||
|
for (int i = 0; i < message.Length; i++) {
|
||||||
|
Console.WriteLine("message[{0}]: {1}", i, message[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,5 @@
|
|||||||
|
C:\Users\Crille\CSharp\10.1-StringPrint\bin\Debug\10.1-StringPrint.exe
|
||||||
|
C:\Users\Crille\CSharp\10.1-StringPrint\bin\Debug\10.1-StringPrint.pdb
|
||||||
|
C:\Users\Crille\CSharp\10.1-StringPrint\obj\x86\Debug\10.1-StringPrint.csprojResolveAssemblyReference.cache
|
||||||
|
C:\Users\Crille\CSharp\10.1-StringPrint\obj\x86\Debug\10.1-StringPrint.exe
|
||||||
|
C:\Users\Crille\CSharp\10.1-StringPrint\obj\x86\Debug\10.1-StringPrint.pdb
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
@@ -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>{73A72A66-B646-4984-8E71-EF6DF4014E6C}</ProjectGuid>
|
||||||
|
<OutputType>Exe</OutputType>
|
||||||
|
<RootNamespace>StringEscape</RootNamespace>
|
||||||
|
<AssemblyName>10.2-StringEscape</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="StringEscape.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio 2012
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "10.2-StringEscape", "10.2-StringEscape.csproj", "{73A72A66-B646-4984-8E71-EF6DF4014E6C}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|x86 = Debug|x86
|
||||||
|
Release|x86 = Release|x86
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{73A72A66-B646-4984-8E71-EF6DF4014E6C}.Debug|x86.ActiveCfg = Debug|x86
|
||||||
|
{73A72A66-B646-4984-8E71-EF6DF4014E6C}.Debug|x86.Build.0 = Debug|x86
|
||||||
|
{73A72A66-B646-4984-8E71-EF6DF4014E6C}.Release|x86.ActiveCfg = Release|x86
|
||||||
|
{73A72A66-B646-4984-8E71-EF6DF4014E6C}.Release|x86.Build.0 = Release|x86
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
<Properties StartupItem="10.2-StringEscape.csproj">
|
||||||
|
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|x86" />
|
||||||
|
<MonoDevelop.Ide.Workbench ActiveDocument="StringEscape.cs">
|
||||||
|
<Files>
|
||||||
|
<File FileName="StringEscape.cs" Line="13" Column="3" />
|
||||||
|
</Files>
|
||||||
|
</MonoDevelop.Ide.Workbench>
|
||||||
|
<MonoDevelop.Ide.DebuggingService.Breakpoints>
|
||||||
|
<BreakpointStore />
|
||||||
|
</MonoDevelop.Ide.DebuggingService.Breakpoints>
|
||||||
|
<MonoDevelop.Ide.DebuggingService.PinnedWatches />
|
||||||
|
</Properties>
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
class StringEscape {
|
||||||
|
public static void Main() {
|
||||||
|
string s1 = "This is just a piece of text";
|
||||||
|
Console.WriteLine(s1);
|
||||||
|
|
||||||
|
string s2 = "Double quotes (\") is important and backslash (\\) too.";
|
||||||
|
Console.WriteLine(s2);
|
||||||
|
|
||||||
|
string s3 = "This is a very long line \nof test that should be on two lines.";
|
||||||
|
Console.WriteLine(s3);
|
||||||
|
|
||||||
|
string s4 = "Anna \t65 \tGDFS";
|
||||||
|
string s5 = "Bertil \t54 \tFDSA";
|
||||||
|
string s6 = "Catrin \t12 \tSG";
|
||||||
|
string s7 = "David \t57 \tGF";
|
||||||
|
|
||||||
|
Console.WriteLine("==================================");
|
||||||
|
Console.WriteLine(s4);
|
||||||
|
Console.WriteLine(s5);
|
||||||
|
Console.WriteLine(s6);
|
||||||
|
Console.WriteLine(s7);
|
||||||
|
}
|
||||||
|
}
|
||||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,5 @@
|
|||||||
|
C:\Users\Crille\CSharp\10.2-StringEscape\bin\Debug\10.2-StringEscape.exe
|
||||||
|
C:\Users\Crille\CSharp\10.2-StringEscape\bin\Debug\10.2-StringEscape.pdb
|
||||||
|
C:\Users\Crille\CSharp\10.2-StringEscape\obj\x86\Debug\10.2-StringEscape.csprojResolveAssemblyReference.cache
|
||||||
|
C:\Users\Crille\CSharp\10.2-StringEscape\obj\x86\Debug\10.2-StringEscape.exe
|
||||||
|
C:\Users\Crille\CSharp\10.2-StringEscape\obj\x86\Debug\10.2-StringEscape.pdb
|
||||||
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
@@ -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>{0557EB80-46E7-486A-B339-893C500FCA44}</ProjectGuid>
|
||||||
|
<OutputType>Exe</OutputType>
|
||||||
|
<RootNamespace>UpperLowerCase</RootNamespace>
|
||||||
|
<AssemblyName>10.3-UpperLowerCase</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="UpperLowerCase.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio 2012
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "10.3-UpperLowerCase", "10.3-UpperLowerCase.csproj", "{0557EB80-46E7-486A-B339-893C500FCA44}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|x86 = Debug|x86
|
||||||
|
Release|x86 = Release|x86
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{0557EB80-46E7-486A-B339-893C500FCA44}.Debug|x86.ActiveCfg = Debug|x86
|
||||||
|
{0557EB80-46E7-486A-B339-893C500FCA44}.Debug|x86.Build.0 = Debug|x86
|
||||||
|
{0557EB80-46E7-486A-B339-893C500FCA44}.Release|x86.ActiveCfg = Release|x86
|
||||||
|
{0557EB80-46E7-486A-B339-893C500FCA44}.Release|x86.Build.0 = Release|x86
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
<Properties StartupItem="10.3-UpperLowerCase.csproj">
|
||||||
|
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|x86" />
|
||||||
|
<MonoDevelop.Ide.Workbench ActiveDocument="UpperLowerCase.cs">
|
||||||
|
<Files>
|
||||||
|
<File FileName="UpperLowerCase.cs" Line="13" Column="32" />
|
||||||
|
</Files>
|
||||||
|
</MonoDevelop.Ide.Workbench>
|
||||||
|
<MonoDevelop.Ide.DebuggingService.Breakpoints>
|
||||||
|
<BreakpointStore />
|
||||||
|
</MonoDevelop.Ide.DebuggingService.Breakpoints>
|
||||||
|
<MonoDevelop.Ide.DebuggingService.PinnedWatches />
|
||||||
|
</Properties>
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
class UpperLowerCase {
|
||||||
|
public static void Main() {
|
||||||
|
string s1 = " ThIS iS jUSt a NORmal pieCe Of TexT. ";
|
||||||
|
|
||||||
|
Console.WriteLine(s1);
|
||||||
|
Console.WriteLine(s1.ToUpper());
|
||||||
|
Console.WriteLine(s1.ToLower());
|
||||||
|
|
||||||
|
Console.WriteLine(s1.TrimEnd());
|
||||||
|
Console.WriteLine(s1.TrimStart());
|
||||||
|
Console.WriteLine(s1.Trim());
|
||||||
|
}
|
||||||
|
}
|
||||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,5 @@
|
|||||||
|
C:\Users\Crille\CSharp\10.3-UpperLowerCase\bin\Debug\10.3-UpperLowerCase.exe
|
||||||
|
C:\Users\Crille\CSharp\10.3-UpperLowerCase\bin\Debug\10.3-UpperLowerCase.pdb
|
||||||
|
C:\Users\Crille\CSharp\10.3-UpperLowerCase\obj\x86\Debug\10.3-UpperLowerCase.csprojResolveAssemblyReference.cache
|
||||||
|
C:\Users\Crille\CSharp\10.3-UpperLowerCase\obj\x86\Debug\10.3-UpperLowerCase.exe
|
||||||
|
C:\Users\Crille\CSharp\10.3-UpperLowerCase\obj\x86\Debug\10.3-UpperLowerCase.pdb
|
||||||
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
@@ -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>{1F69D2C8-C291-4E63-AB6D-418645ED3652}</ProjectGuid>
|
||||||
|
<OutputType>Exe</OutputType>
|
||||||
|
<RootNamespace>IndexOf</RootNamespace>
|
||||||
|
<AssemblyName>10.4-IndexOf</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="IndexOf.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio 2012
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "10.4-IndexOf", "10.4-IndexOf.csproj", "{1F69D2C8-C291-4E63-AB6D-418645ED3652}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|x86 = Debug|x86
|
||||||
|
Release|x86 = Release|x86
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{1F69D2C8-C291-4E63-AB6D-418645ED3652}.Debug|x86.ActiveCfg = Debug|x86
|
||||||
|
{1F69D2C8-C291-4E63-AB6D-418645ED3652}.Debug|x86.Build.0 = Debug|x86
|
||||||
|
{1F69D2C8-C291-4E63-AB6D-418645ED3652}.Release|x86.ActiveCfg = Release|x86
|
||||||
|
{1F69D2C8-C291-4E63-AB6D-418645ED3652}.Release|x86.Build.0 = Release|x86
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
<Properties StartupItem="10.4-IndexOf.csproj">
|
||||||
|
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|x86" />
|
||||||
|
<MonoDevelop.Ide.Workbench ActiveDocument="IndexOf.cs">
|
||||||
|
<Files>
|
||||||
|
<File FileName="IndexOf.cs" Line="11" Column="39" />
|
||||||
|
</Files>
|
||||||
|
</MonoDevelop.Ide.Workbench>
|
||||||
|
<MonoDevelop.Ide.DebuggingService.Breakpoints>
|
||||||
|
<BreakpointStore />
|
||||||
|
</MonoDevelop.Ide.DebuggingService.Breakpoints>
|
||||||
|
<MonoDevelop.Ide.DebuggingService.PinnedWatches />
|
||||||
|
</Properties>
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
class IndexOf {
|
||||||
|
public static void Main() {
|
||||||
|
string s1 = "Denna text kan man leka med en stund.";
|
||||||
|
|
||||||
|
Console.WriteLine(s1.IndexOf("te"));
|
||||||
|
Console.WriteLine(s1.IndexOf("yhfdsnhbvfd"));
|
||||||
|
Console.WriteLine(s1.IndexOf("De"));
|
||||||
|
Console.WriteLine(s1.IndexOf("k"));
|
||||||
|
Console.WriteLine(s1.IndexOf("k", 12));
|
||||||
|
}
|
||||||
|
}
|
||||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,5 @@
|
|||||||
|
C:\Users\Crille\CSharp\10.4-IndexOf\bin\Debug\10.4-IndexOf.exe
|
||||||
|
C:\Users\Crille\CSharp\10.4-IndexOf\bin\Debug\10.4-IndexOf.pdb
|
||||||
|
C:\Users\Crille\CSharp\10.4-IndexOf\obj\x86\Debug\10.4-IndexOf.csprojResolveAssemblyReference.cache
|
||||||
|
C:\Users\Crille\CSharp\10.4-IndexOf\obj\x86\Debug\10.4-IndexOf.exe
|
||||||
|
C:\Users\Crille\CSharp\10.4-IndexOf\obj\x86\Debug\10.4-IndexOf.pdb
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
@@ -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>{DB5F3F12-05A8-4D79-A6DC-9100F24FA569}</ProjectGuid>
|
||||||
|
<OutputType>Exe</OutputType>
|
||||||
|
<RootNamespace>SubString</RootNamespace>
|
||||||
|
<AssemblyName>10.5-SubString</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="SubString.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio 2012
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "10.5-SubString", "10.5-SubString.csproj", "{DB5F3F12-05A8-4D79-A6DC-9100F24FA569}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|x86 = Debug|x86
|
||||||
|
Release|x86 = Release|x86
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{DB5F3F12-05A8-4D79-A6DC-9100F24FA569}.Debug|x86.ActiveCfg = Debug|x86
|
||||||
|
{DB5F3F12-05A8-4D79-A6DC-9100F24FA569}.Debug|x86.Build.0 = Debug|x86
|
||||||
|
{DB5F3F12-05A8-4D79-A6DC-9100F24FA569}.Release|x86.ActiveCfg = Release|x86
|
||||||
|
{DB5F3F12-05A8-4D79-A6DC-9100F24FA569}.Release|x86.Build.0 = Release|x86
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
<Properties StartupItem="10.5-SubString.csproj">
|
||||||
|
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|x86" />
|
||||||
|
<MonoDevelop.Ide.Workbench ActiveDocument="SubString.cs">
|
||||||
|
<Files>
|
||||||
|
<File FileName="SubString.cs" Line="17" Column="1" />
|
||||||
|
</Files>
|
||||||
|
</MonoDevelop.Ide.Workbench>
|
||||||
|
<MonoDevelop.Ide.DebuggingService.Breakpoints>
|
||||||
|
<BreakpointStore />
|
||||||
|
</MonoDevelop.Ide.DebuggingService.Breakpoints>
|
||||||
|
<MonoDevelop.Ide.DebuggingService.PinnedWatches />
|
||||||
|
</Properties>
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
class SubString {
|
||||||
|
public static void Main() {
|
||||||
|
string s1 = "C:/Users/Crille/Desktop/profilbild.jpg";
|
||||||
|
|
||||||
|
Console.WriteLine("Filandelse: " + s1.Substring(s1.Length - 3, 3));
|
||||||
|
|
||||||
|
int username_start = s1.IndexOf('/', 3) + 1;
|
||||||
|
int username_end = s1.IndexOf('/', username_start + 1);
|
||||||
|
int username_length = username_end - username_start;
|
||||||
|
|
||||||
|
Console.WriteLine("Start: {0}, End: {1}, Length: {2}", username_start, username_end, username_length);
|
||||||
|
Console.WriteLine("Username: " + s1.Substring(username_start, username_length));
|
||||||
|
}
|
||||||
|
}
|
||||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,5 @@
|
|||||||
|
C:\Users\Crille\CSharp\10.5-SubString\bin\Debug\10.5-SubString.exe
|
||||||
|
C:\Users\Crille\CSharp\10.5-SubString\bin\Debug\10.5-SubString.pdb
|
||||||
|
C:\Users\Crille\CSharp\10.5-SubString\obj\x86\Debug\10.5-SubString.csprojResolveAssemblyReference.cache
|
||||||
|
C:\Users\Crille\CSharp\10.5-SubString\obj\x86\Debug\10.5-SubString.exe
|
||||||
|
C:\Users\Crille\CSharp\10.5-SubString\obj\x86\Debug\10.5-SubString.pdb
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
@@ -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>{214078D2-FCAA-4D23-B866-ED22A641B0B3}</ProjectGuid>
|
||||||
|
<OutputType>Exe</OutputType>
|
||||||
|
<RootNamespace>StringSplit</RootNamespace>
|
||||||
|
<AssemblyName>10.6-StringSplit</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="StringSplit.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio 2012
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "10.6-StringSplit", "10.6-StringSplit.csproj", "{214078D2-FCAA-4D23-B866-ED22A641B0B3}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|x86 = Debug|x86
|
||||||
|
Release|x86 = Release|x86
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{214078D2-FCAA-4D23-B866-ED22A641B0B3}.Debug|x86.ActiveCfg = Debug|x86
|
||||||
|
{214078D2-FCAA-4D23-B866-ED22A641B0B3}.Debug|x86.Build.0 = Debug|x86
|
||||||
|
{214078D2-FCAA-4D23-B866-ED22A641B0B3}.Release|x86.ActiveCfg = Release|x86
|
||||||
|
{214078D2-FCAA-4D23-B866-ED22A641B0B3}.Release|x86.Build.0 = Release|x86
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
<Properties StartupItem="10.6-StringSplit.csproj">
|
||||||
|
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|x86" />
|
||||||
|
<MonoDevelop.Ide.Workbench ActiveDocument="StringSplit.cs">
|
||||||
|
<Files>
|
||||||
|
<File FileName="StringSplit.cs" Line="12" Column="3" />
|
||||||
|
</Files>
|
||||||
|
</MonoDevelop.Ide.Workbench>
|
||||||
|
<MonoDevelop.Ide.DebuggingService.Breakpoints>
|
||||||
|
<BreakpointStore />
|
||||||
|
</MonoDevelop.Ide.DebuggingService.Breakpoints>
|
||||||
|
<MonoDevelop.Ide.DebuggingService.PinnedWatches />
|
||||||
|
</Properties>
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
class StringSplit {
|
||||||
|
public static void Main() {
|
||||||
|
string listOfBeers = "Guinness, Vesper Ale, Dales Pale Ale, Snowcat, Punk IPA";
|
||||||
|
char[] separators = new char[] { ',' };
|
||||||
|
string[] beersArr = listOfBeers.Split(separators);
|
||||||
|
|
||||||
|
foreach (var item in beersArr) {
|
||||||
|
Console.WriteLine(item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,5 @@
|
|||||||
|
C:\Users\Crille\CSharp\10.6-StringSplit\obj\x86\Debug\10.6-StringSplit.csprojResolveAssemblyReference.cache
|
||||||
|
C:\Users\Crille\CSharp\10.6-StringSplit\bin\Debug\10.6-StringSplit.exe
|
||||||
|
C:\Users\Crille\CSharp\10.6-StringSplit\bin\Debug\10.6-StringSplit.pdb
|
||||||
|
C:\Users\Crille\CSharp\10.6-StringSplit\obj\x86\Debug\10.6-StringSplit.exe
|
||||||
|
C:\Users\Crille\CSharp\10.6-StringSplit\obj\x86\Debug\10.6-StringSplit.pdb
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
@@ -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>
|
||||||
@@ -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
|
||||||
@@ -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>
|
||||||
@@ -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.
Loaded 100 of 378 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user