TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
John Q
NA
12
44.3k
String array declare
Jan 17 2014 3:51 PM
I declared the following array variable as public and in my frmMain_Load it seemed to populate the array alright, but in my button1_Click, it said the arrayofDots[] is null. Does anyone have any ideas? Thanks in advance.
public partial class frmMain : Form
{
public string[] arrayofDots;
-----
private void frmMain_Load(object sender, EventArgs e)
{
string[] arrayofDots = new String[20];
for (int cc = 0; cc <= 15; cc++) { arrayofDots[cc] = new string('.', 17 - cc); }
}
-----
private void button1_Click(object sender, EventArgs e)
{
for (int ii = 0; ii <= 15; ii++)
{
if (st.StartsWith(arrayofDots[ii].ToString()))
Reply
Answers (
1
)
how can validate special characters in textbox c#.net
How to dynamically use dataset to genrate report?