Click here to Skip to main content
15,885,782 members
Home / Discussions / C#
   

C#

 
AnswerRe: code to generate text from the given string and how to detect "\" in the text as a text and not as a tag during parsing of rtf file Pin
BillWoodruff9-Feb-14 19:03
professionalBillWoodruff9-Feb-14 19:03 
AnswerRe: code to generate text from the given string and how to detect "\" in the text as a text and not as a tag during parsing of rtf file Pin
Richard Deeming10-Feb-14 1:41
mveRichard Deeming10-Feb-14 1:41 
QuestionDisable combo box on selecting an option. Pin
Mohan Subramani9-Feb-14 3:40
Mohan Subramani9-Feb-14 3:40 
AnswerRe: Disable combo box on selecting an option. Pin
OriginalGriff9-Feb-14 3:47
mveOriginalGriff9-Feb-14 3:47 
AnswerRe: Disable combo box on selecting an option. Pin
BillWoodruff9-Feb-14 6:18
professionalBillWoodruff9-Feb-14 6:18 
Questionvideo and gps Pin
jas168-Feb-14 23:21
jas168-Feb-14 23:21 
AnswerRe: video and gps Pin
Ravi Bhavnani9-Feb-14 4:34
professionalRavi Bhavnani9-Feb-14 4:34 
QuestionGetting Data From User Pin
RebornProgrammer8-Feb-14 21:00
RebornProgrammer8-Feb-14 21:00 
Hi all, I'm pretty new to C# and would like to have some questions answered regarding getting data from the user. Suppose I have a class called MyClass like the following:
C#
Class MyClass
{
string firstName;
string lastName;

MyClass(string fName, string lName)
{
this.firstName=fName;
this.lastName=lname;
}

public string fN{ get { return firstName; }set { firstName= value; } }
public string lN { get { return _firstName; } set { lastName= value; }}

}

Then in the code behind of my aspx page I want to create an array of type MyClass and get firstName and lastName from the user and put them in the array.

I plan to have the user enter firstName and lastName into textboxes and insert them into the array by sending them in as parameters during the instantiation of the array. The following is what I have done but it does not work.
C#
 MyClass[] projects = new MyClass[4];
//Get firstName and lastName from textbox
            projects[0] = new Project(firstName, lastName);  

Any help is greatly appreciated, thanks in advance

modified 9-Feb-14 3:08am.

AnswerRe: Getting Data From User Pin
OriginalGriff8-Feb-14 23:21
mveOriginalGriff8-Feb-14 23:21 
QuestionWrite to notepad or other windows Pin
alirezamansoori8-Feb-14 19:27
alirezamansoori8-Feb-14 19:27 
AnswerRe: Write to notepad or other windows Pin
OriginalGriff8-Feb-14 19:58
mveOriginalGriff8-Feb-14 19:58 
QuestionHow to Fetch UserName & Current Date automatically. Pin
Mohan Subramani8-Feb-14 7:01
Mohan Subramani8-Feb-14 7:01 
AnswerRe: How to Fetch UserName & Current Date automatically. Pin
OriginalGriff8-Feb-14 7:32
mveOriginalGriff8-Feb-14 7:32 
AnswerRe: How to Fetch UserName & Current Date automatically. Pin
Dave Kreskowiak8-Feb-14 9:22
mveDave Kreskowiak8-Feb-14 9:22 
AnswerRe: How to Fetch UserName & Current Date automatically. Pin
Mycroft Holmes8-Feb-14 13:35
professionalMycroft Holmes8-Feb-14 13:35 
AnswerRe: How to Fetch UserName & Current Date automatically. Pin
Richard Deeming10-Feb-14 1:37
mveRichard Deeming10-Feb-14 1:37 
Questionhow can i get min value in datatable with distinct items using loops Pin
yahiaalaa8-Feb-14 5:49
yahiaalaa8-Feb-14 5:49 
AnswerRe: how can i get min value in datatable with distinct items using loops Pin
TnTinMn8-Feb-14 6:54
TnTinMn8-Feb-14 6:54 
AnswerRe: how can i get min value in datatable with distinct items using loops Pin
Mycroft Holmes8-Feb-14 13:31
professionalMycroft Holmes8-Feb-14 13:31 
AnswerRe: how can i get min value in datatable with distinct items using loops Pin
Md Nazmoon Noor13-May-14 3:21
Md Nazmoon Noor13-May-14 3:21 
QuestionSSH Connection to Cisco Router Pin
sikas_Cisco8-Feb-14 4:36
sikas_Cisco8-Feb-14 4:36 
SuggestionRe: SSH Connection to Cisco Router Pin
Richard MacCutchan8-Feb-14 5:28
mveRichard MacCutchan8-Feb-14 5:28 
GeneralRe: SSH Connection to Cisco Router Pin
sikas_Cisco8-Feb-14 5:34
sikas_Cisco8-Feb-14 5:34 
GeneralRe: SSH Connection to Cisco Router Pin
Richard MacCutchan8-Feb-14 5:37
mveRichard MacCutchan8-Feb-14 5:37 
GeneralRe: SSH Connection to Cisco Router Pin
dharmegh9-Feb-14 19:23
dharmegh9-Feb-14 19:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.