blob: a04fc9a00d0d0e8e43a01e398e587c5f08bf1456 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
using System;
using System.Collections.Generic;
using System.Diagnostics.Contracts;
using System.Linq;
using System.Text;
/* Example of string functionality needed by Poirot: concatenation and equality */
class StringsExample
{
public static void Main()
{
string foo = "delicious";
string bar = "cake";
Contract.Assert(!foo.Equals(bar));
string foo_bar = foo + bar;
Contract.Assert(foo_bar.Equals("deliciouscake"));
string delish = "delicious";
Contract.Assert(foo.Equals(delish));
}
}
|