I've put together a free course on the most useful modern C# features. Enrol today and share it with your colleagues and the wider community. Modern C# Course #csharp #dotnet
Good start. You are already using Console.ReadLine() and that method allow you to insert all your input in a single line. The method returns a string with all the input in it.
My advice is to ask yourself this question:
How would you solve this problem manually without using a computer?
Try to resolve the example you provided manually on a piece of paper. Try to identify the steps you follow and identify patterns.
Then try to translate each of the steps you...
Use reflection: use GetField and SetValue methods
You can use reflection.
The following code should point you in the right direction.
public class User
{
public int UserId;
}
public class Program
{
public static void Main()
{
var...
I recommend the book Essential C# 6. It is a great balance between pragmatism and completeness. If you are ok waiting, a new version covering C# 7 is coming out in May 2018: Essential C# 7.0.
If you are interested in regular content on C#, feel free to check out my blog at...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.