This file contains hidden or 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 ReportActor : ReceiveActor | |
{ | |
private Dictionary<string, long> _articleTimeSpent; | |
private Dictionary<string, int> _articleViews; | |
public ReportActor() | |
{ | |
_articleTimeSpent = new Dictionary<string, long>(); | |
_articleViews = new Dictionary<string, int>(); |
This file contains hidden or 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
var person = new Tuple<string, string, int>( | |
"Nikola", "Rubiks Code", 30); | |
Console.WriteLine("{0} has a blog called {1}, and he is {2} years old", | |
person.Item1, person.Item2, person.Item3); |
This file contains hidden or 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
private (string, string, int) GetNameBlogAndAge() | |
{ | |
return ('Nikola Zivkovic', 'www.rubikscode.net', 30); | |
} |
This file contains hidden or 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
var nameBlogAge = GetNameBlogAndAge(); | |
Console.WriteLine("Name is: {0}", nameBlogAge.Item1); |
This file contains hidden or 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
private static (string name, string blog, int age) GetNameBlogAndAge() | |
{ | |
return ('Nikola Zivkovic', 'www.rubikscode.net', 30); | |
} |
This file contains hidden or 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
private static (string, string, int) GetNameBlogAndAge() | |
{ | |
return (name: 'Nikola', blog: 'www.rubikscode.net', age: 30); | |
} |
This file contains hidden or 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
var nameBlogAge = GetNameBlogAndAge(); | |
Console.WriteLine("Name is: {0}", nameBlogAge.name); |
This file contains hidden or 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
(string name, string blog, int age) = GetNameBlogAndAge(); | |
Console.WriteLine("Name is: {0}", name); |
This file contains hidden or 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 (var sqlConnection = new SqlConnection(connectionString)) | |
{ | |
sqlConnection.Open(); | |
try | |
{ | |
using (var readCommand = new SqlCommand("select * from Entity", sqlConnection)) | |
{ | |
var reader = readCommand.ExecuteReader(); |
This file contains hidden or 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 (var sqlDataHandler = new SqlDataHandler()) | |
{ | |
var entity = sqlDataHandler.ReadEntity(); | |
sqlDataHandler.UpdateDataFieldInEntity(entity, modificationValue); | |
} | |
Console.WriteLine("Data successfuly modified!"); | |
Console.ReadLine(); |