Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

making a list of chars in c#

string data = "ABCDEFGHIJ1fFJKAL";
List<char> datalist = new List<char>();
datalist.AddRange(data);
Comment

how to make a string a list of characters c#

string scentence = "Hi there"; // Defining a string to turn to characters

char[] charArr = scentence.ToCharArray() // Turns String to a list of characters
  
//The output of charArr would be:
//['H', 'i', ' ', 't', 'h', 'e', 'r', 'e']
  
  
/*
Answer by Ren Rawbone
*/
Comment

PREVIOUS NEXT
Code Example
Csharp :: c# list get element from end 
Csharp :: how is c# pronounced 
Csharp :: remove items from list c# condition 
Csharp :: unity gameobject to mouse 
Csharp :: how to ping in c# forms 
Csharp :: convert dto to dictionary c# 
Csharp :: c# negative index 
Csharp :: unity change material 
Csharp :: c# stringbuilder to file 
Csharp :: how to reference function in unity 
Csharp :: c# string to enum 
Csharp :: unity custom editor save changes 
Csharp :: DateTime previous day c# 
Csharp :: c# mongodb connection 
Csharp :: get time part from datetime as timestamp in c# 
Csharp :: c# linq to dictionary 
Csharp :: bootstrap modal 
Csharp :: reverse for loop unity 
Csharp :: c# stop loop 
Csharp :: c# error CS0515 
Csharp :: c# file dialog to get folder path 
Csharp :: asp.net model display name 
Csharp :: how to make error sound c# 
Csharp :: c# datetime remove time 
Csharp :: c# create a zip files 
Csharp :: debug c# console 
Csharp :: c# map 
Csharp :: console.writeline c# 
Csharp :: bytes to httppostedfilebase c# 
Csharp :: unity camera follow player 3d smooth 
ADD CONTENT
Topic
Content
Source link
Name
8+2 =