Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

c# fill value into label1

Posted on 2011-02-15
2
Medium Priority
?
381 Views
Last Modified: 2012-05-11
I want to fill label1 with  EmailsList how can i do that

 if(!string.IsNullOrEmpty(result))
                {
                    Coderbuddy.ExtractEmails helper = new Coderbuddy.ExtractEmails(result);
                    EmailsList = helper.Extract_Emails();
                    label1.TextAlign = EmailsList;
                   
                }
0
Comment
Question by:teera
2 Comments
 
LVL 53

Accepted Solution

by:
Dhaest earned 1000 total points
ID: 34894864
What type is EmailsList  ? Is this a string or string[] ?

If string: your code is correct ...

if string[]: which do you want to show ? The first of the list or all ?
Show the first: label1.TextAlign = EmailsList[0];
All: label1.TextAlign = String.Join(";",EmailsList);
0
 
LVL 3

Assisted Solution

by:chandra_darbha
chandra_darbha earned 1000 total points
ID: 34896912
If it is a string it should be label1.Text and not label1.TextAlign.

Thanks,
Chandra
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …

876 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question