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

I am developing a web application using google map api.I want to update the map inside the div control within update panel. I got other controls updated but map doesn't get updated.I do not not want to update map whenever unnecessary controls are fired at server side.How could it be achieved?

0 Answers  


Write a program which has a function and that function should take 2 or 3 or any number of strings and it should return the largest common prefix of all those strings. If there is no common prefix it should return an empty string. for eg:- INPUT OUTPUT glo {glory,glorious,glod} gl {glad,glow} {calendar,phone} empty string

2 Answers   Mind Tree,


program for straight line(y=mx+c)

0 Answers   Mind Tree,


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

2 Answers   Sify,


How to use ASP.NET 2.0's TreeView to Display Hierarchical Data?

1 Answers  


Write a function which accepts list of nouns as input parameter and return the same list in the plural form. Conditions: i) if last letter is r then append s ii) if word ends with y then replace it by ies iii) call this function in main() and produce the required output. for eg:- if chair is input it should give chairs as output.

0 Answers   Mind Tree,


Automatically Hyperlink URLs and E-Mail Addresses in ASP.NET Pages with C#

1 Answers  


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

4 Answers   Wipro,


Code for Reading and writing from a file in c#?

1 Answers  


Write a program. there are 1..n numbers placed in an array in random fashion with one integer missing. find the missing number.

1 Answers   Infosys, Mind Tree,


Code for Working with Files under a Directory?

1 Answers  


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,


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)