Hello All.
This is my first post, I'm new to C#.
I would like to spilt the below string. My delimiter => ";" and each part is in double quotes.
string myLine = "John Smith"; "A"; "45", "Nearly done; follow up";
My expected output:
John Smith
A
45
Nearly done; follow up
I tried to go with...
I am creating a Text-Based game, and when I first started, I just made it so that if you skipped past the naming process, you would be given a name, but I don't want players to skip past the process anymore. I want them to pick their names out intentionally, but I don't know how to make it so...
I don't understand what I am reading wrong...
According to this section of the documentation, Strings should be able to be split using a second String as the seperator. The documentation says:
However, when I actually attempt this, the code fails and throws an error, claiming that the...
So, I'm using this bit of code in "Visual Studio Code" and it keeps saying: "Converting null literal or possible null value to non-nullable type."
string name = Console.ReadLine();
This is the bit of code I am using and it should work fine! Please help me!
I'm using TripleDESCryptoService and I keep the encrypted text in byte[]. I want to display this on a textBox. So I choose AsciiOnly = False for maskedTextBox. Now I copy a non-ascii character and paste it on maskedTextBox and there is no problem. But when I do it in code it fails.
Example text...
I am in a difficulty to convert a List that is class object which populated from database, so far so good to have that list of object but I need its string[,] (2D) array as converted to apply a method which helps to get an print output.
private void dateTimePicker1_ValueChanged(object sender...
Hello everybody! I have a problem with verbatim string. I want to write this "c:\\projects\\project1\\enter"
I use verbatim string for that. But when I run console it always display me c:\projects\project1\enter. I want to write code which is easier to read.
I want double backslash not just one...
Hi everyone,
First question here...
If I'm correct, String is a reference datatype, right?
See my code below:
String nameOne = "Matthew";
String nameTwo = nameOne;
nameOne = "Andrew";
In the end, I should expect both nameOne and nameTwo to be Andrew...
Good Day, I Have A List<string> Saved In My App User Settings, this List is supposed to save the file paths of a openfiledialog to then deserialize it, but I already Called the method Save(); And even the method Upgrade(); After adding the strings to the list, but this strings, doesn´t save. Why?
Is there any way to improve the speed in my script??
Thanks in advance, appreciate any help.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;
namespace MegaTool
{
public static class mega...
Hello all: I'm new to coding and this forum, using c# visual studio 2012. I am trying to get this code to read the user input and read it on a separate line. I get an un-handled exception, not sure why. Thank You
using System;
using System.Collections.Generic;
using System.Linq;
using...
So i'm doing some practice exercises and i came across the issue. Lets say we have entered a string : "My name is Tod", "My life is hard", "Do you even lift bruh?". so what i'm asking is what kind of code should it be so that if i type "Tod" in my "search" it would find that string?
Hello, I am very new to C# and coding in general. I wanted to connect to a commonly used website/webpage: IMDB, Avengers 2 and essentially take some text from that page, store it within a string, and then print that out within a text block.
So I gave it a go, you'll probably cringe but oh...
Hello, I am making a C# console application which calculates BTEC grades to UCAS points.
Only thing is, this course has 18 units, so I want the user to enter either 'p', 'm' or 'd' and maybe some other inputs if I choose to later.
So when the user enters something wrong like 'wefttryh239y' then...
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.