mirror of
https://github.com/markjprice/cs11dotnet7.git
synced 2026-04-04 22:07:39 +00:00
Initial commit
This commit is contained in:
parent
ca7684985d
commit
49bdd4dda1
60 changed files with 1527 additions and 30 deletions
14
vscode/Chapter03/Ch03Ex05Operators/Ch03Ex05Operators.csproj
Normal file
14
vscode/Chapter03/Ch03Ex05Operators/Ch03Ex05Operators.csproj
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Using Include="System.Console" Static="true" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
23
vscode/Chapter03/Ch03Ex05Operators/Program.cs
Normal file
23
vscode/Chapter03/Ch03Ex05Operators/Program.cs
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
WriteLine("int x = 3;");
|
||||
WriteLine("int y = 2 + ++x;");
|
||||
|
||||
int x = 3;
|
||||
int y = 2 + ++x;
|
||||
WriteLine($"x = {x} and y = {y}");
|
||||
WriteLine();
|
||||
|
||||
WriteLine("x = 3 << 2;");
|
||||
WriteLine("y = 10 >> 1;");
|
||||
|
||||
x = 3 << 2;
|
||||
y = 10 >> 1; ;
|
||||
WriteLine($"x = {x} and y = {y}");
|
||||
WriteLine();
|
||||
|
||||
WriteLine("x = 10 & 8;");
|
||||
WriteLine("y = 10 | 7;");
|
||||
|
||||
x = 10 & 8;
|
||||
y = 10 | 7;
|
||||
WriteLine($"x = {x} and y = {y}");
|
||||
WriteLine();
|
||||
Loading…
Add table
Add a link
Reference in a new issue