Click here to Skip to main content
15,900,110 members
Home / Discussions / C#
   

C#

 
GeneralRe: Adding and Removing Form Controls Programatically Pin
Marc Clifton21-May-07 5:05
mvaMarc Clifton21-May-07 5:05 
QuestionChange Locked property Pin
Tushar Mahajan21-May-07 3:17
Tushar Mahajan21-May-07 3:17 
AnswerRe: Change Locked property Pin
Manoj Kumar Rai21-May-07 3:38
professionalManoj Kumar Rai21-May-07 3:38 
GeneralRe: Change Locked property Pin
Tushar Mahajan21-May-07 3:46
Tushar Mahajan21-May-07 3:46 
GeneralRe: Change Locked property Pin
Martin#21-May-07 4:33
Martin#21-May-07 4:33 
GeneralRe: Change Locked property Pin
Tushar Mahajan21-May-07 18:55
Tushar Mahajan21-May-07 18:55 
AnswerRe: Change Locked property Pin
Martin#21-May-07 3:41
Martin#21-May-07 3:41 
QuestionApplication Error---Any help please?? Pin
Ntoki21-May-07 2:55
Ntoki21-May-07 2:55 
UNDER WORDPAIR.CS
using System;
using System.Collections.Generic;
using System.Text;

namespace Assignment_No._2
{
class WordPair
{
string[] rightpair = new string[5]
{"below\tunter","blue\tgelb","cat\tdie katze","red\trot","the dog\tder Hund","to read\tlesen"
};
public string CheckMatch(string english, string german)
{
string combined = english + "\t" + german;
if (Array.IndexOf(rightpair, combined) != -1)
{
return String.Format("'{0}'was correctly matched with '{1}'", english,
german);
}
else
{
return String.Format("No match was found for '{0}'with '{1}'",
english, german);


}
}
}
}
________________________________________________________________________
UNDER FORM 1.CS

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace Assignment_No._
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void button1_Click(object sender, EventArgs e)
{
WordPair wp = new WordPair();
string result1 = wp.CheckMatch("below","unter");
string result2 = Environment.NewLine + wp.CheckMatch("blue", "rot");
richTextBox1.Text = result1 + result2;

}
}
}
___________________________________________________________________________
UNDER PROGRAM C.S
using System;
using System.Collections.Generic;
using System.Windows.Forms;

namespace Assignment_No._
{
static class Program
{
///
/// The main entry point for the application.
///

[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
//WordPair wp = new WordPair();
//string result1 = wp.CheckMatch("below", "unter");
//string result2 = Environment.NewLine + wp.CheckMatch("blue", "rot");
//richTextBox1.Text = result1 + result2;
}
}
}
___________________________________________________________________________
BUILD ERRORS
Error 2 The type or namespace name 'WordPair' could not be found (are you missing a using directive or an assembly reference?) E:\Documents and Settings\Ntiko\My Documents\Visual Studio 2005\Projects\Assignment No.2\Assignment No.2\Form1.cs 20 13 Assignment No.2
------------------------------------------
Error 3 The type or namespace name 'WordPair' could not be found (are you missing a using directive or an assembly reference?) E:\Documents and Settings\Ntiko\My Documents\Visual Studio 2005\Projects\Assignment No.2\Assignment No.2\Form1.cs 20 31 Assignment No.2
---------------------------------------------
Error 4 The type or namespace name 'WordPair' could not be found (are you missing a using directive or an assembly reference?) E:\Documents and Settings\Ntiko\My Documents\Visual Studio 2005\Projects\Assignment No.2\Assignment No.2\Program.cs 18 15 Assignment No.2
----------------------------------------
Error 5 The type or namespace name 'WordPair' could not be found (are you missing a using directive or an assembly reference?) E:\Documents and Settings\Ntiko\My Documents\Visual Studio 2005\Projects\Assignment No.2\Assignment No.2\Program.cs 18 33 Assignment No.2
-------------------------------------------------
Error 6 The name 'richTextBox1' does not exist in the current context E:\Documents and Settings\Ntiko\My Documents\Visual Studio 2005\Projects\Assignment No.2\Assignment No.2\Program.cs 21 15 Assignment No.2
--------------------------------------------------

Error 7 Invalid rank specifier: expected ',' or ']' E:\Documents and Settings\Ntiko\My Documents\Visual Studio 2005\Projects\Assignment No.2\Assignment No.2\WordPair.cs 10 5 Assignment No.2
-----------------------------------------------------

Also pop up message saying that;

Visual studio cannot start debugging because the debug target E:\Documents and Settings\Ntiko\my Documents\visual studio 2005\projetcs\Assignment No.2\Assignment No.2\bin\Debug\Assignment No.2.exe' is missing. Please build the project and retry or set the outpath and Assembly Name properties appropriately to point at the correct location for the target assembly.

Any suggestions resolving this kind of staff?????


Ntoki

AnswerRe: Application Error---Any help please?? Pin
Guffa21-May-07 3:00
Guffa21-May-07 3:00 
QuestionHow to send Date as a DateTime Object?. Pin
pubududilena21-May-07 2:51
pubududilena21-May-07 2:51 
AnswerRe: How to send Date as a DateTime Object?. Pin
Manoj Kumar Rai21-May-07 3:00
professionalManoj Kumar Rai21-May-07 3:00 
GeneralRe: How to send Date as a DateTime Object?. Pin
pubududilena21-May-07 3:14
pubududilena21-May-07 3:14 
GeneralRe: How to send Date as a DateTime Object?. Pin
Manoj Kumar Rai21-May-07 3:26
professionalManoj Kumar Rai21-May-07 3:26 
GeneralRe: How to send Date as a DateTime Object?. Pin
pubududilena21-May-07 3:39
pubududilena21-May-07 3:39 
AnswerRe: How to send Date as a DateTime Object?. Pin
DoomedOne21-May-07 11:34
DoomedOne21-May-07 11:34 
QuestionInterface question Pin
groundzero11121-May-07 1:58
groundzero11121-May-07 1:58 
AnswerRe: Interface question Pin
Pete O'Hanlon21-May-07 2:12
mvePete O'Hanlon21-May-07 2:12 
AnswerRe: Interface question [modified] Pin
Dave Herren21-May-07 3:21
Dave Herren21-May-07 3:21 
GeneralRe: Interface question Pin
groundzero11121-May-07 6:43
groundzero11121-May-07 6:43 
QuestionDataGrid Cell Merging Pin
rujuc#21-May-07 1:56
rujuc#21-May-07 1:56 
QuestionDigital Persona Pin
| Muhammad Waqas Butt |21-May-07 1:19
professional| Muhammad Waqas Butt |21-May-07 1:19 
AnswerRe: Digital Persona Pin
Dave Kreskowiak21-May-07 6:35
mveDave Kreskowiak21-May-07 6:35 
QuestionDataSet Query Pin
Blumen21-May-07 0:38
Blumen21-May-07 0:38 
AnswerRe: DataSet Query Pin
Colin Angus Mackay21-May-07 0:59
Colin Angus Mackay21-May-07 0:59 
GeneralRe: DataSet Query Pin
Blumen21-May-07 3:14
Blumen21-May-07 3:14 

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.