Initial commit
This commit is contained in:
36
11.1-Exceptions/11.1-Exceptions.csproj
Normal file
36
11.1-Exceptions/11.1-Exceptions.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>{AF70674E-61C1-4339-9E8F-01565900F023}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>Exceptions</RootNamespace>
|
||||
<AssemblyName>11.1-Exceptions</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="Exceptions.cs" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
17
11.1-Exceptions/11.1-Exceptions.sln
Normal file
17
11.1-Exceptions/11.1-Exceptions.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}") = "11.1-Exceptions", "11.1-Exceptions.csproj", "{AF70674E-61C1-4339-9E8F-01565900F023}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|x86 = Debug|x86
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{AF70674E-61C1-4339-9E8F-01565900F023}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{AF70674E-61C1-4339-9E8F-01565900F023}.Debug|x86.Build.0 = Debug|x86
|
||||
{AF70674E-61C1-4339-9E8F-01565900F023}.Release|x86.ActiveCfg = Release|x86
|
||||
{AF70674E-61C1-4339-9E8F-01565900F023}.Release|x86.Build.0 = Release|x86
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
12
11.1-Exceptions/11.1-Exceptions.userprefs
Normal file
12
11.1-Exceptions/11.1-Exceptions.userprefs
Normal file
@@ -0,0 +1,12 @@
|
||||
<Properties StartupItem="11.1-Exceptions.csproj">
|
||||
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|x86" />
|
||||
<MonoDevelop.Ide.Workbench ActiveDocument="Exceptions.cs">
|
||||
<Files>
|
||||
<File FileName="Exceptions.cs" Line="16" Column="4" />
|
||||
</Files>
|
||||
</MonoDevelop.Ide.Workbench>
|
||||
<MonoDevelop.Ide.DebuggingService.Breakpoints>
|
||||
<BreakpointStore />
|
||||
</MonoDevelop.Ide.DebuggingService.Breakpoints>
|
||||
<MonoDevelop.Ide.DebuggingService.PinnedWatches />
|
||||
</Properties>
|
||||
26
11.1-Exceptions/Exceptions.cs
Normal file
26
11.1-Exceptions/Exceptions.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
|
||||
class Exceptions {
|
||||
public static void Main() {
|
||||
int[] arr = new int[5];
|
||||
|
||||
for (int i = 0; i < 5; i++) {
|
||||
arr[i] = i * 2;
|
||||
}
|
||||
Console.WriteLine("Innehallet i arrayen");
|
||||
|
||||
try {
|
||||
for (int i = 0; i < 10; i++) {
|
||||
Console.WriteLine("Array[{0}]: {1}", i, arr[i]);
|
||||
}
|
||||
}
|
||||
catch (IndexOutOfRangeException iob) {
|
||||
Console.WriteLine("Du vet val att man inte kan loopa utanfor en array?");
|
||||
Console.WriteLine(iob);
|
||||
}
|
||||
catch (Exception ex) {
|
||||
Console.WriteLine("Nagot bidde fel");
|
||||
Console.WriteLine(ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
BIN
11.1-Exceptions/bin/Debug/11.1-Exceptions.exe
Normal file
BIN
11.1-Exceptions/bin/Debug/11.1-Exceptions.exe
Normal file
Binary file not shown.
BIN
11.1-Exceptions/bin/Debug/11.1-Exceptions.pdb
Normal file
BIN
11.1-Exceptions/bin/Debug/11.1-Exceptions.pdb
Normal file
Binary file not shown.
@@ -0,0 +1,5 @@
|
||||
C:\Users\Crille\CSharp\11.1-Exceptions\bin\Debug\11.1-Exceptions.exe
|
||||
C:\Users\Crille\CSharp\11.1-Exceptions\bin\Debug\11.1-Exceptions.pdb
|
||||
C:\Users\Crille\CSharp\11.1-Exceptions\obj\x86\Debug\11.1-Exceptions.csprojResolveAssemblyReference.cache
|
||||
C:\Users\Crille\CSharp\11.1-Exceptions\obj\x86\Debug\11.1-Exceptions.exe
|
||||
C:\Users\Crille\CSharp\11.1-Exceptions\obj\x86\Debug\11.1-Exceptions.pdb
|
||||
Binary file not shown.
BIN
11.1-Exceptions/obj/x86/Debug/11.1-Exceptions.exe
Normal file
BIN
11.1-Exceptions/obj/x86/Debug/11.1-Exceptions.exe
Normal file
Binary file not shown.
BIN
11.1-Exceptions/obj/x86/Debug/11.1-Exceptions.pdb
Normal file
BIN
11.1-Exceptions/obj/x86/Debug/11.1-Exceptions.pdb
Normal file
Binary file not shown.
Reference in New Issue
Block a user