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 |
How to Create a Treeview Menu in ASP.NET with C#?
write a Program to copy the string using switch case.
How to use ASP.NET 2.0's TreeView to Display Hierarchical Data?
How to Link Different Data Sources Together?
Code for Reading and writing from a file?
Code for Searching for Multiple Matches with the MatchCollection Class?
Code for IP Address Comparison and Conversion in C#?
program for addition of fraction(M/N + P/Q = Y/Z)
Can you declare an array of mixed Types?
How to Create Files by Using the FileInfo Class?
how do i copy textbox contents of 1 form to another form
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.