标签:c#
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApplication1 { class Program { //定义结构函数 struct customerName { public string firstName, lastName; public string name() { return firstName + " " + lastName; } } static void Main(string [] args) { //调用结构函数 customerName myCustomer; myCustomer.firstName = "John"; myCustomer.lastName = "Franklin"; Console.WriteLine( myCustomer.name ()); Console.ReadLine(); } } }
本文出自 “Ricky's Blog” 博客,请务必保留此出处http://57388.blog.51cto.com/47388/1651183
标签:c#
原文地址:http://57388.blog.51cto.com/47388/1651183