O
O
Osmanov Osman2020-08-26 17:41:07
C++ / C#
Osmanov Osman, 2020-08-26 17:41:07

What is the difference between string[] and string in C#?

I am learning C#. I can't find anywhere what the string[] type means. It is used in the entry point, but don't know what it is. It's just that when I create a function, I need to specify the type. I use object[], but why they usually use string[] I don't know. Explain, please

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
demiash, 2020-08-26
@OSMANOF

string[] - array of strings, for example: string[] names = new string[] {"Kolya", "Vasya", "Petya"}
sring - one string, for example: string name = "Joseph"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question