I'm trying to parse an entered email address into a text box. I want to split the entered input like this (before the @ sign and after it) BOB | @ | GMAIL.COM. This is what I have so far for my code:
txtEmail.Text = txtEmail.Trim(); // using this to trim the string to make sure there are no spaces
txtEmail = txtEmail.Split(@); //telling it where to split the string entered
This code probably makes no sense but I'm having trouble with this so I try to put together whatever things I found useful from examples I found online.
I also read this link: How to parse strings using String.Split (C# Guide)
I'm still confused on what exactly to write, does anyone have a simpler example of what parsing does and how to do? (I'm a beginner in C# so even if you have the most basic example it'll really help me out)
Thanks!
txtEmail.Text = txtEmail.Trim(); // using this to trim the string to make sure there are no spaces
txtEmail = txtEmail.Split(@); //telling it where to split the string entered
This code probably makes no sense but I'm having trouble with this so I try to put together whatever things I found useful from examples I found online.
I also read this link: How to parse strings using String.Split (C# Guide)
I'm still confused on what exactly to write, does anyone have a simpler example of what parsing does and how to do? (I'm a beginner in C# so even if you have the most basic example it'll really help me out)
Thanks!
Last edited: