Can you declare an array of mixed Types?



Can you declare an array of mixed Types?..

Answer / kris

public struct FormStruct
{

public string Name ;
public string Address;
public int Phone;

}
class Program
{

static void Main(string[] args)
{

FormStruct home;
home.Name = "xyz";
home.Address= "blabla";
home.Phone= 9955511122;

}

}

Is This Answer Correct ?    5 Yes 17 No

Post New Answer

More C Sharp Code Interview Questions

Write a program to input an integer and - display the reverse - display the sum of each digit - should include logic that considers the input number as any number of digits long

2 Answers   Mind Tree,


Can you declare an array of mixed Types?

1 Answers   HCL,


Write a program to convert postfix expression to infix expression.

0 Answers   Mind Tree,


program to reverse the order of words in a string.

2 Answers   Mind Tree,


how to get the table names via c sharp and column names also?

2 Answers   Sify,






"c sharp" code for factorial using static variables

9 Answers  


how can i split sting in textbox in windows application using c# .net

2 Answers  


How to add a value from textBox over an existing certain column in SQL Server

0 Answers  


How to export 2 datatables of a single dataset to 2 different worksheets of a single MSExcel file ?

0 Answers   Eastcom Systems,


How to Create a Treeview Menu in ASP.NET with C#?

1 Answers  


how do i copy textbox contents of 1 form to another form

4 Answers   Wipro,


Write a program to count 3Letter, 4Letter and 5Letter words from a file and print the number of 3Letter, 4Letter and 5Letter words. Delimiter is space, tab, hifen. Also we should not consider the line in the file after we encounter # in that line.

0 Answers   Mind Tree,


Categories
  • ASP.NET Code Interview Questions ASP.NET Code (46)
  • VB.NET Code Interview Questions VB.NET Code (9)
  • C Sharp Code Interview Questions C Sharp Code (51)
  • ADO.NET Code Interview Questions ADO.NET Code (8)