Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
zicaC#
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { //Your code goes here String []veta = new String[3]; for (int i = 0; i < veta.Length; i++) { veta[i] = Console.ReadLine(); Console.WriteLine(i+1 + "ª palavra: " + veta[i]); } Console.WriteLine(); int tam = 12; Console.WriteLine("tam: {0}, alt: {1}\n", tam, 16); DateTime dat = new DateTime(1992, 3, 17); //string data = String.Split(dat, ' '); var data1 = dat.ToShortDateString(); var data2 = dat.ToString("dd/MM/yyyy"); Console.WriteLine("A data eh: {0} e a hora eh: {1}", data1, "3:15\n"); //string []nomes = new string[]{"Laila", "Carla", "Luiz", "Lia", "Sonia"}; string[] nomes = {"Laila", "Carla", "Luiz", "Lia", "Sonia"}; var nome = from name in nomes where name[0] == 'L' select name; //Console.WriteLine("----" + nome.ToArray()[0] + "----"); foreach(var n in nome) { Console.WriteLine(n); } } } }
run
|
edit
|
history
|
help
0
Array Comparison
Prueba
hihi
matching parenthesis
ref variables/parameters
Exception Handling
online compiler
123
per1
Nullable type - Value Exception - Solution