This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace FileProcessor | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
JoinNamesAndAges(); | |
SetOperations(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class AppData | |
{ | |
public ImmutableArray<Country> AllCountries { get; private set; } | |
public ImmutableDictionary<CountryCode, Country> AllCountriesByKey | |
{ get; private set; } | |
public void Initialize(string csvFilePath) | |
{ | |
CsvReader reader = new CsvReader(csvFilePath); | |
var countries = reader.ReadAllCountries().OrderBy(x=>x.Name).ToList(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class AppData | |
{ | |
public List<Country> AllCountries { get; private set; } | |
public Dictionary<CountryCode, Country> AllCountriesByKey { get; private set; } | |
public void Initialize(string csvFilePath) | |
{ | |
CsvReader reader = new CsvReader(csvFilePath); | |
this.AllCountries = reader.ReadAllCountries().OrderBy(x => x.Name).ToList(); | |
var dict = AllCountries.ToDictionary(x => x.Code); | |
this.AllCountriesByKey = dict; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Country Name | Country Code | Continent | Population 2017 | |
---|---|---|---|---|
China | CHN | Asia | 1386395000 | |
India | IND | Asia | 1339180127 | |
United States | USA | North America | 325719178 | |
Indonesia | IDN | Asia | 263991379 | |
Brazil | BRA | South America | 209288278 | |
Pakistan | PAK | Asia | 197015955 | |
Nigeria | NGA | Africa | 190886311 | |
Bangladesh | BGD | Asia | 164669751 | |
Russian Federation | RUS | Europe | 144495044 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class AppData | |
{ | |
public List<Country> AllCountries { get; private set; } | |
public void Initialize(string csvFilePath) | |
{ | |
CsvReader reader = new CsvReader(csvFilePath); | |
this.AllCountries = reader.ReadAllCountries(); | |
// during the module, the above line is changed to | |
//this.AllCountries = reader.ReadAllCountries().OrderBy(x=>x.Name).ToList(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
public class Program | |
{ | |
public static void Main() | |
{ | |
DateTime[] bankHols1 ={ | |
new DateTime(2021, 1, 1), | |
new DateTime(2021, 4, 2), | |
new DateTime(2021, 4, 5) | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
public class Program | |
{ | |
public static void Main() | |
{ | |
ProcessMyStringTuple("san"); | |
void ProcessMyStringTuple(string name) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
public class Program | |
{ | |
public static void Main() | |
{ | |
ProcessMyStringTuple("san"); | |
void ProcessMyStringTuple(string name) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
public class Program | |
{ | |
public static void Main() | |
{ | |
var result = ProcessMyStringTuple("san"); | |
Console.WriteLine($"Length :{result.length} , Name in Upper case : {result.upperCaseName}"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en" xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta charset="utf-8" /> | |
<title></title> | |
</head> | |
<body> | |
<div style="text-align:center"> | |
<h1> ESP Test</h1> |