how can i split sting in textbox in windows application using
c# .net
Answers were Sorted based on User's Feedback
Answer / suresh
DropDown spliting numbers1-100,101-200,...901-1000
ddlnumbers.Items.Clear();
string s=ddlselct.SelectedItem.ToString();
string[] value = s.Split('-');
var v1 =Convert.ToInt32(value[0]);
var v2 =Convert.ToInt32(value[1]);
for (int i = v1; i <= v2; i++)
{
ddlnumbers.Items.Add(i.ToString());
}
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / sasd
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 words)
{
for (int i = 0; i <= 3; i++)
{
a[i] = word;
}
| Is This Answer Correct ? | 11 Yes | 15 No |
How to use ASP.NET 2.0's TreeView to Display Hierarchical Data?
IS Array list is generic or non generic
Code for Reading and writing from a file?
c# code to Count number of 1's in a given range of integer (0 to n)
program for addition of fraction(M/N + P/Q = Y/Z)
Write a program. there are 1..n numbers placed in an array in random fashion with one integer missing. find the missing number.
Can you declare an array of mixed Types?
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.
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..)
Event Handling in C# Triggering a Button
Code for Working with Files under a Directory?
program to reverse the order of words in a string.