Mhhh yes economik
namespace Solution
{
using System;
internal class BlockchainApplication
{
public static void Main(string[] args)
{
Block block1 = new Block("this is first!");
Block block2 = new Block(block1.Hash);
Block block3 = new Block(block2.Hash);
Block block4 = new Block(block3.Hash);
Block block5 = new Block(block4.Hash);
Console.WriteLine("Mhhh yes blokchayne indeed");
Console.WriteLine(block5.Hash);
}
}
public class Block
{
public string Hash {get; private set;}
public string PreviousHash {get; set;}
public Block(string previousHash)
{
this.PreviousHash = previousHash;
this.Hash = previousHash + "this is how it works right?";
}
}
}
namespace Solution {
using NUnit.Framework;
using System;
// TODO: Replace examples and use TDD by writing your own tests
[TestFixture]
public class SolutionTest
{
[Test]
public void MyTest()
{
// Ew tests
}
}
}
Mathematics
Algorithms
Logic
Numbers
Data Types
Hmmm yes useless wrapper functions
using System; using System.Linq; public class Sum { public Int64 GetSum(params Int64[] nums) => nums.Sum(); }
- using System;
- using System.Linq;
- public class Sum
- {
public Int64 GetSum(Int64 a, Int64 b) => a + b;- public Int64 GetSum(params Int64[] nums) => nums.Sum();
- }
namespace Solution { using NUnit.Framework; using System; [TestFixture] public class SolutionTest { [Test] public void MyTest() { Sum sum = new Sum(); Assert.AreEqual(19,sum.GetSum(9, 10)); Assert.AreEqual(22,sum.GetSum(12,10)); Assert.AreEqual(4294967292,sum.GetSum(2147483646,2147483646)); Assert.AreEqual(69, sum.GetSum(60, 5, 4)); Assert.AreEqual(42069, sum.GetSum(40000, 2000, 60, 5, 3, 1)); } } }
- namespace Solution {
- using NUnit.Framework;
- using System;
- [TestFixture]
- public class SolutionTest
- {
- [Test]
- public void MyTest()
- {
- Sum sum = new Sum();
- Assert.AreEqual(19,sum.GetSum(9, 10));
- Assert.AreEqual(22,sum.GetSum(12,10));
- Assert.AreEqual(4294967292,sum.GetSum(2147483646,2147483646));
- Assert.AreEqual(69, sum.GetSum(60, 5, 4));
- Assert.AreEqual(42069, sum.GetSum(40000, 2000, 60, 5, 3, 1));
- }
- }
- }