Create char array
create-char-array.aspx
<%@ Page Language="C#" AutoEventWireup="true"%>
<!DOCTYPE html>
<script runat="server">
protected void Button1_Click(object sender, System.EventArgs e)
{
char[] chararray = { 'c','f','s','u','m','a','n'};
Label1.Text = "char array output: ";
foreach (char c in chararray)
{
Label1.Text += c;
}
Label1.Text += "<br />char array separated: ";
foreach (char c in chararray)
{
Label1.Text += c + " | ";
}
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>c# example - create char array</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<h2 style="color:DarkBlue; font-style:italic;">
c# example - create char array
</h2>
<hr width="550" align="left" color="LightBlue" />
<asp:Label
ID="Label1"
runat="server"
Font-Size="Large"
>
</asp:Label>
<br /><br />
<asp:Button
ID="Button1"
runat="server"
Text="create char array"
OnClick="Button1_Click"
Height="40"
Font-Bold="true"
/>
</div>
</form>
</body>
</html>
- How to merge two arrays without duplicates
- How to merge two arrays
- How to create a string from a char array
- How to check string contains a string in string array
- How to check char array contains a char
- Array initialization syntaxes
- How to get the average of an int array elements
- How to use array any
- How to use linq any operator with a string array
- How to pass an array as a parameter to a method