Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
vangj committed Apr 22, 2023
1 parent bf130de commit 58c5a58
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
24 changes: 24 additions & 0 deletions app6-array/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
internal class Program
{
private static void Main(string[] args)
{
string[] names = {
"john", "jack", "mary", "mandy"
};

for (int i = 0; i < names.Length; i++)
{
Console.WriteLine(names[i]);
}
Console.WriteLine(new string('-', 15));

foreach (var n in names)
{
Console.WriteLine(n);
}
Console.WriteLine(new string('-', 15));

names.ToList().ForEach(n => Console.WriteLine(n));
Console.WriteLine(new string('-', 15));
}
}
11 changes: 11 additions & 0 deletions app6-array/app6-array.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<RootNamespace>app6_array</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

</Project>

0 comments on commit 58c5a58

Please sign in to comment.