Thanks for the comment. I'm currently working on the twitter course, haven't been posting a ton lately because I've been doing more research with API deployments and making sure that I can teach it in the most beginner friendly way possible. More videos should be coming out soon though!
I'm so pleased to watch your videos because you explain how to code so well and step by step. I really appreciate your help and please keep posting more videos about coding. You are fantastic. Cheers.
Create a C# menu-driven console application using OOP concepts that comprises the following functionality, 1- Ability to register a student details (Name, Gender & Age) 2- Ability to view student list. 3- Ability to view delete & edit students
Sounds like a fun homework project. I would check out my video on Properties, Classes, and Objects. If you have a solid understanding of those and this video as well, then this project should be very do-able.
Hello, so I am working on making a simulation of a bus, I have managed to make passengers and make it store them, but I have run into problems now when it comes to making functions for the list of objects. Like for instance if I wanted the user to give a parameter of an age let's say 100-80. And then it returns the passengers that match that age. Can't seem to figure out how to do something like that.
Hi lan I have a question that how can I assign a unique Guid to each object inside the collection of objects,so that later on it could help me in removing the specified object only through UI controls.
This is a great content. My suggestion is try and re-arrange your C# tuorial, so they are in order. Topics are not sequential. A question for you, which book would you recomment for C#. Thanks
I thought I arranged the videos in order but your right, I'm going to have to fix that. My favorite book on C# is "C# 7 and .NET Core 2.0". Its huge and goes over everything. Its what I base many of my tutorials off of. Here is a link: www.amazon.com/Professional-NET-Core-Christian-Nagel/dp/1119449278/ref=sr_1_3?dchild=1&keywords=C%237+and+.NET+Core+2.0&qid=1595977072&sr=8-3
Can I ask. If I make list of button with code : List btn = new List(); How can I add all of buttons in the list to forms's control? I tried using : This.Controls.Add(btn); But it's didn't work somehow.
Great question. a simple way would be to loop through each item in the list and see if it is equal to the search text. if it is then return the desired information. Take a look at the example below: var searchText = "Ian"; foreach(var contact in contacts) { if(contact.Name == searchText) { Console.WriteLine(contact.Name); Console.WriteLine(contact.PhoneNumber); } } I would highly suggest looking at my video that explains class properties because that is essentially all this is. Hope that helps!
How can you deal with lists, inside of lists, inside of lists. Like a list of casinos, each of which has a list of tables, each of which has a list of card decks, each deck deals a number of games, each game has a list players and hands, a list of cards in a discard pile and a list of chips in the pot, as well as in each player's possession. Finally each hand has a list of cards. Let's go pro here. Let's conquer serious REAL WORLD use cases.
if you want to nest lists you can just do List. For instance if I had a list of casinos and wanted to access the list of tables I would do the following: 1. Create a casino class 2. Create a table class 3. Inside the table class add the properties (dealer, card deck, etc) 4. Inside the casino class create a property that is a list of tables: public List tables {get; set;} 5. inside your program create a list of casinos: List casinos = new List(); 6. Reference a specific table from a specific casino (in this case the fifth table from the first casino): casinos[0].tables[4] You can go as deep as you would like but that is the basic concept. Also keep in mind for this series we are explaining major concepts at a more surface level. There is a lot you could do with lists, but if you understand how a basic list is made and the relationship between your data then going deeper into it isnt terribly difficult. Hope this helps!
Here is a link on how to delete a list item: stackoverflow.com/questions/18917725/c-sharp-remove-object-from-list-of-objects Here is a link on how to edit a list item: stackoverflow.com/questions/4914802/editing-an-item-in-a-listt Remember to practice the concepts not just copy the code!
Hi it is simple you should have to create a private field name(name,age,phone number ) and then assign the Console.ReadLine() based user input into it those private fields.and finally at the place of.add(place the above inputs).job done.
Ian, i really appreciate your work. You way of approaching code is interesting, please do more. all the best.
Thanks for the comment. I'm currently working on the twitter course, haven't been posting a ton lately because I've been doing more research with API deployments and making sure that I can teach it in the most beginner friendly way possible. More videos should be coming out soon though!
I'm so pleased to watch your videos because you explain how to code so well and step by step. I really appreciate your help and please keep posting more videos about coding. You are fantastic. Cheers.
Create a C# menu-driven console application using OOP concepts that comprises the following functionality,
1- Ability to register a student details (Name, Gender & Age)
2- Ability to view student list.
3- Ability to view delete & edit students
Sounds like a fun homework project. I would check out my video on Properties, Classes, and Objects. If you have a solid understanding of those and this video as well, then this project should be very do-able.
this video is amazingly amazing, how you're not above 100k subscribers is beyond me, you earned yourself a new loyal subscriber my guy
Simple and Awesome Content! ❤️⭐💯Thanks alot.
Ian, tks man! I'm really enjoy this video. From Brazil.
Hello, so I am working on making a simulation of a bus, I have managed to make passengers and make it store them, but I have run into problems now when it comes to making functions for the list of objects. Like for instance if I wanted the user to give a parameter of an age let's say 100-80. And then it returns the passengers that match that age. Can't seem to figure out how to do something like that.
pls sorry for asking, pls why do you used for each
How do I copy an array of these into another object using this list method. I see zero tutorials online.
Ian , I have a list of 50000 record I read from sql ..now how to split the list into smaller list in c# ...Any idea?
Hi lan I have a question that how can I assign a unique Guid to each object inside the collection of objects,so that later on it could help me in removing the specified object only through UI controls.
I really appreciate your hard work. Is this possible to make it dynamic rather than raw code?
do we need fields when creating a model class? or are the auto properties enough?
This is a great content. My suggestion is try and re-arrange your C# tuorial, so they are in order. Topics are not sequential. A question for you, which book would you recomment for C#. Thanks
I thought I arranged the videos in order but your right, I'm going to have to fix that. My favorite book on C# is "C# 7 and .NET Core 2.0". Its huge and goes over everything. Its what I base many of my tutorials off of. Here is a link: www.amazon.com/Professional-NET-Core-Christian-Nagel/dp/1119449278/ref=sr_1_3?dchild=1&keywords=C%237+and+.NET+Core+2.0&qid=1595977072&sr=8-3
Can I ask. If I make list of button with code :
List btn = new List();
How can I add all of buttons in the list to forms's control?
I tried using :
This.Controls.Add(btn);
But it's didn't work somehow.
thank you man! you solved my problem
Ian how to use this list in another class?
Ian, how can I remove Contact Kenny?
Thank you, that helpful
how to fetch using name in list of objects
How would you search for a contact with a specific name and then show that specific name and phone number?
Great question. a simple way would be to loop through each item in the list and see if it is equal to the search text. if it is then return the desired information. Take a look at the example below:
var searchText = "Ian";
foreach(var contact in contacts)
{
if(contact.Name == searchText)
{
Console.WriteLine(contact.Name);
Console.WriteLine(contact.PhoneNumber);
}
}
I would highly suggest looking at my video that explains class properties because that is essentially all this is. Hope that helps!
Thank you
How can you deal with lists, inside of lists, inside of lists. Like a list of casinos, each of which has a list of tables, each of which has a list of card decks, each deck deals a number of games, each game has a list players and hands, a list of cards in a discard pile and a list of chips in the pot, as well as in each player's possession. Finally each hand has a list of cards. Let's go pro here. Let's conquer serious REAL WORLD use cases.
if you want to nest lists you can just do List. For instance if I had a list of casinos and wanted to access the list of tables I would do the following:
1. Create a casino class
2. Create a table class
3. Inside the table class add the properties (dealer, card deck, etc)
4. Inside the casino class create a property that is a list of tables: public List tables {get; set;}
5. inside your program create a list of casinos: List casinos = new List();
6. Reference a specific table from a specific casino (in this case the fifth table from the first casino): casinos[0].tables[4]
You can go as deep as you would like but that is the basic concept. Also keep in mind for this series we are explaining major concepts at a more surface level. There is a lot you could do with lists, but if you understand how a basic list is made and the relationship between your data then going deeper into it isnt terribly difficult. Hope this helps!
how do you delete and edit
Here is a link on how to delete a list item: stackoverflow.com/questions/18917725/c-sharp-remove-object-from-list-of-objects
Here is a link on how to edit a list item: stackoverflow.com/questions/4914802/editing-an-item-in-a-listt
Remember to practice the concepts not just copy the code!
OOF, nice name
If anyone is seeing this, how do I instead of .Add() change it to accept Inputs from users like console.readline() for Name, PhoneNumber and Age???
Hi it is simple you should have to create a private field name(name,age,phone number ) and then assign the Console.ReadLine() based user input into it those private fields.and finally at the place of.add(place the above inputs).job done.