Top C Sharp Code Interview Questions :: ALLInterview.com http://www.allinterview.com Top C Sharp Code Interview Questions en-us &quot;c sharp&quot; code for factorial using static variables http://www.allinterview.com/showanswers/32695.html using System; class fact { int factorial(int x) { Static int y=1; y=y*x; return y; } public static void Main() { fact f=new fact(); int k=Convert.ToInt32(System.ReadLine()); for(int i=1;i<=x;i++) { int x=f.factorial(i); } System.C How to Create a Treeview Menu in ASP.NET with C#? http://www.allinterview.com/showanswers/18011.html Microsoft.Web.UI.WebControls.TreeView Treeview11 public void PopulateTree() { TreeNode nodeProdDetail, nodeProdMaster; nodeProdMaster = new TreeNode(); nodeProdMaster.Text = "Master1"; nodeProdMaster.ID = "1 how do i copy textbox contents of 1 form to another form http://www.allinterview.com/showanswers/82063.html Hi, By using state management variables you can get the value of textbox from one form to another,like querystring,session,cookies etc eg) Session["value"]=textboxid.Text;//Set the value in one form string s=Session["value".To Write a program to input an integer and - display the reverse http://www.allinterview.com/showanswers/117469.html /* * Copyright 2002 Sun Microsystems, Inc. All Rights Reserved. * * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * -Redi program to reverse the order of words in a string. http://www.allinterview.com/showanswers/117459.html import java.io.*; import java.lang.*; public class StringReverse { public static void main(String[] args)throws Exception { String words = "hi frends........ welcome to my world"; Stri Coding for Manipulate XML File Data Using C#? http://www.allinterview.com/showanswers/18026.html XmlDocument doc = new XmlDocument(); doc.Load((@"c:/newfile.xml"); XmlNode xnode = doc.SelectSingleNode("//Settings/Bar"); //read the value of “Dheeraj”) String Str = xnode.Innerxml; //TO Update the value of “Dheeraj” to “Kum Write a program to count the number of characters, number of words, n http://www.allinterview.com/showanswers/117468.html File.ReadAllLines("").Length; File.ReadAllText("").Split(' ').Length - 1; File.ReadAllText("").Length How to pass multiple rows from one gridview to another gridview afte http://www.allinterview.com/showanswers/74952.html int i; DataTable ObjDT = new DataTable(); DataColumn objcol1 = new DataColumn(); objcol1.DataType = System.Type.GetType("System.Int16"); objcol1.ColumnName = "Category_id"; How to use ASP.NET 2.0&#039;s TreeView to Display Hierarchical Data? http://www.allinterview.com/showanswers/18019.html protected void TreeView1_SelectedNodeChanged(object sender, EventArgs e) { Label1.Text = "You Selected " + TreeView1.SelectedNode.Text + " category"; } protected void Page_Load(object sender program to check if a number is &quot;perfect number&quot;. http://www.allinterview.com/showanswers/117461.html public boolean isPerfect(int number) { int i = sumFactors(number); if (i == number) { return true; } else return false; } public int sumFactors(int number) { int factor = 0, sum = 0; for ( Event Handling in C# Triggering a Button http://www.allinterview.com/showanswers/18022.html using System; using System.Windows.Forms; using System.Drawing; public class Butevent:Form { TextBox t1 = new TextBox(); Button b1 = new Button(); public Butevent() { this.Text = "C# Program "; t1.Location = new Point(20,30); b1 how can i split sting in textbox in windows application using c# .ne http://www.allinterview.com/showanswers/143252.html string s = in_txt.Text; string[] a; // Split string on spaces. // ... This will separate all the words. // string[] words = s.Split(' '); foreach(string word in w program for string reverse(eg:- i am boy -&gt; boy am i) http://www.allinterview.com/showanswers/117463.html reverse() program to reverse the order of digits in a given number of any lengt http://www.allinterview.com/showanswers/117460.html main() { long int a; int num[]; clrscr(); printf("enter a number"); scanf("%ld",&a); while(a!=0) { d=a%10; static int i=0;/* here we declare variable as static life time is thru out the prgm*/ num[i]=d;/* store e program for straight line(y=mx+c) http://www.allinterview.com/showanswers/117464.html