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

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

0 Answers   Eastcom Systems,


Create a class called Accounts which has data members like ACCOUNT no, Customer name, Account type, Transaction type (d/w), amount, balance D->Deposit W->Withdrawal If transaction type is deposit call the credit(int amount) and update balance in this method. If transaction type is withdraw call debit(int amt) and update balance. Pass the other information like Account no,name,Account Type through constructor. Call the show data method to display the values.

1 Answers   Cognizant,


program for string reverse(eg:- i am boy -> boy am i)

8 Answers   Black Pepper, Infosys, Mind Tree,


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

2 Answers  


how to change password in .net with c # with ado.net and also SQL server 2008 change password

1 Answers  






"c sharp" code for factorial using static variables

9 Answers  


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,


Write a function which accepts a sentence as input parameter.Each word in that sentence is to be reversed. Space should be there between each words.Return the sentence with reversed words to main function and produce the required output. for eg:- i/p: jack jill jung kill o/p: kcaj llij gnuj llik

1 Answers   Mind Tree,


Event Handling in C# Triggering a Button

1 Answers  


Can you declare an array of mixed Types?

1 Answers   HCL,


Code for IP Address Comparison and Conversion in C#?

0 Answers  


How to find No of classes,Packages,No of Methods per Classes and Depth of Inheritance for selecting source code in windows form application using c# .net? (Source code is input Program. It may be Java or .net) Please help me..) Thanks..)

0 Answers  


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)