Answers for "return an array from a function c#"

C#
0

how to return array in function c#

static string[] GetNames()
        {
            return new [] { "Matthew", "Mark", "Luke", "John" };
            
        }
Posted by: Guest on March-24-2021
1

return array in c#

public static string[] Person_Info(string firstname, string middlename, string lastname, string age, string birthdate)
        {
            return new[]
            {
            firstname,
            middlename,
            lastname,
            age,
            birthdate
            };
        }
Posted by: Guest on August-27-2021

Code answers related to "return an array from a function c#"

C# Answers by Framework

Browse Popular Code Answers by Language