Read and modify string as character array

preview_player
Показать описание
In this video, we will cover how to convert a string into a character array in C#.

Basic Steps:

Create a character array of the same length as the input string.
Use a for loop to iterate through the input string.
Assign each character of the input string to the corresponding index of the character array.
Modify specific character in char array.
Display both string and char array in MessageBox


C# .NET
Windows Form Application
Visual Studio
String
Foreach Loop
char array
If else statement
ToCharArray method
Messagebox Show
Method Return
Рекомендации по теме
Комментарии
Автор

Hi Rory,
I think the order of your videos in the playlist is again a bit confusing. Here in this 29th video you are explaining character arrays, while in the previous 28th video you are using them 'heavily'. Further more the next, 30th video in the playlist explains ASCII codes, and some basic character functions too, which, I think, the basics of understanding strings, characters, and character arrays later on.
So INMHO the correct video order in the playlist would be (using 'bottom to top' logic):
- the currently 30th video should be 28th
- then this one (currently 29th in the playlist),
- and finally the currently 28th video should be 30th
I'm not complaining as I could follow all of these videos, as I've seen C and C++ codes a lot (in my previous life), but a beginner (like my daughter) would have hard time to understand your lections in the current video order.

Anyway, thx. for your work to explaining so much and in so many ways/details!

deldadam
welcome to shbcf.ru