string

  1. Socarsky

    Convert a List<object> to a string[,] 2D array

    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...
  2. Sajo

    Resolved Problem with verbatim string

    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...
  3. M

    Resolved Value types and reference types

    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...
  4. S

    Question Why My List<string> Saved In User Settings doesn´t Save the strings?

    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?
  5. G

    Question Improving speed in my code

    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...
  6. S

    Question Unhandled exception string problem user input

    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...
  7. M

    Question Search for strings by its partial name?

    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?
  8. A

    Question How can I access webpage text data and store it within a text block in my .WPF?

    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...
  9. RedTurbo

    Question How to control what the user enters and give an error if needed?

    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...
Top Bottom