added checksum utilities

main
Fionn 3 years ago
parent 87482452ce
commit cf1a23341a

@ -3,7 +3,16 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17 # Visual Studio Version 17
VisualStudioVersion = 17.2.32516.85 VisualStudioVersion = 17.2.32516.85
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ISBN", "ISBN\ISBN.csproj", "{3BFA78C7-4DE1-46CD-912F-59D3DE0B9788}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ISBN", "ISBN\ISBN.csproj", "{3BFA78C7-4DE1-46CD-912F-59D3DE0B9788}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EANValidator", "EANValidator\EANValidator.csproj", "{2E12BD9A-5E23-4ED9-8B1C-63C8AB19D39D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "dotFionn.Checksum.Utils", "dotFionn.Checksum.Utils\dotFionn.Checksum.Utils.csproj", "{B8ED20C2-C851-47B8-8509-12E4A3D2F18C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "test", "test\test.csproj", "{DAE25550-52A1-440A-B6B9-C588357620D4}"
ProjectSection(ProjectDependencies) = postProject
{B8ED20C2-C851-47B8-8509-12E4A3D2F18C} = {B8ED20C2-C851-47B8-8509-12E4A3D2F18C}
EndProjectSection
EndProject EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -15,6 +24,18 @@ Global
{3BFA78C7-4DE1-46CD-912F-59D3DE0B9788}.Debug|Any CPU.Build.0 = Debug|Any CPU {3BFA78C7-4DE1-46CD-912F-59D3DE0B9788}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3BFA78C7-4DE1-46CD-912F-59D3DE0B9788}.Release|Any CPU.ActiveCfg = Release|Any CPU {3BFA78C7-4DE1-46CD-912F-59D3DE0B9788}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3BFA78C7-4DE1-46CD-912F-59D3DE0B9788}.Release|Any CPU.Build.0 = Release|Any CPU {3BFA78C7-4DE1-46CD-912F-59D3DE0B9788}.Release|Any CPU.Build.0 = Release|Any CPU
{2E12BD9A-5E23-4ED9-8B1C-63C8AB19D39D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2E12BD9A-5E23-4ED9-8B1C-63C8AB19D39D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2E12BD9A-5E23-4ED9-8B1C-63C8AB19D39D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2E12BD9A-5E23-4ED9-8B1C-63C8AB19D39D}.Release|Any CPU.Build.0 = Release|Any CPU
{B8ED20C2-C851-47B8-8509-12E4A3D2F18C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B8ED20C2-C851-47B8-8509-12E4A3D2F18C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B8ED20C2-C851-47B8-8509-12E4A3D2F18C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B8ED20C2-C851-47B8-8509-12E4A3D2F18C}.Release|Any CPU.Build.0 = Release|Any CPU
{DAE25550-52A1-440A-B6B9-C588357620D4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DAE25550-52A1-440A-B6B9-C588357620D4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DAE25550-52A1-440A-B6B9-C588357620D4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DAE25550-52A1-440A-B6B9-C588357620D4}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE

@ -0,0 +1,19 @@
using System;
namespace dotFionn.Checksum.Utils
{
public static class Extensions
{
public static int digitSum(this int inInt)
{
int digitSum = 0;
while (inInt > 0) {
digitSum += inInt % 10;
inInt /= 10;
}
return digitSum;
}
}
}

@ -0,0 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>
</Project>

@ -0,0 +1,15 @@
using System;
using dotFionn.Checksum.Utils;
namespace test
{
internal class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
Console.WriteLine(123.digitSum());
}
}
}

@ -0,0 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\dotFionn.Checksum.Utils\dotFionn.Checksum.Utils.csproj" />
</ItemGroup>
</Project>
Loading…
Cancel
Save