Click here to Skip to main content
15,891,423 members
Home / Discussions / C#
   

C#

 
GeneralRe: Please Help me Pin
Addy Tas4-Dec-11 11:15
Addy Tas4-Dec-11 11:15 
GeneralRe: Please Help me Pin
Eddy Vluggen4-Dec-11 11:29
professionalEddy Vluggen4-Dec-11 11:29 
AnswerRe: Please Help me Pin
BillWoodruff4-Dec-11 13:44
professionalBillWoodruff4-Dec-11 13:44 
GeneralRe: Please Help me Pin
Peter_in_27804-Dec-11 13:50
professionalPeter_in_27804-Dec-11 13:50 
GeneralRe: Please Help me Pin
Arunkumar.Koloth4-Dec-11 15:04
Arunkumar.Koloth4-Dec-11 15:04 
GeneralRe: Please Help me Pin
BillWoodruff4-Dec-11 15:33
professionalBillWoodruff4-Dec-11 15:33 
AnswerRe: Please Help me Pin
Abhinav S4-Dec-11 17:50
Abhinav S4-Dec-11 17:50 
GeneralRe: Please Help me Pin
Arunkumar.Koloth4-Dec-11 20:36
Arunkumar.Koloth4-Dec-11 20:36 
Hai again this is my class code

C#
using System;
using System.Collections.Generic;
using System.Text;
using System.Data.SQLite;

namespace sample
{
    class translation
    {

        private SQLiteConnection sql_con;
        private SQLiteCommand sql_cmd;
        private SQLiteDataAdapter DB;
        private SQLiteDataReader dr;

        public void LoadTranslations(int languagecode)
        {
            string[] TextinTranslatedArray = new string[200];
            string[] TextinEnglishArray = new string[] { "Admin","User","ZHome","UserName"};

            for (int i = 0; i < TextinEnglishArray.Length; i++)
            {
                string sql;
                sql = "SELECT f_text_translated FROM t01_text_translation WHERE f_text_english='" + TextinEnglishArray[i] + "'AND f_language_code='" + languagecode + "'";
                sql_cmd = sql_con.CreateCommand();
                sql_cmd.CommandText = sql;
                dr=sql_cmd.ExecuteReader();
                TextinTranslatedArray[i] = dr.GetValue(0).ToString();
            }

            sql_con.Close();
        }
         private void SetConnection()
        {
            sql_con = new SQLiteConnection("Data Source=DATA.sl3;Version=3;New=False;Compress=True;");
        }


    }
}


AND WHEN I CREATE A OBJECT FOR THIS CLASS IN MY FORM I GOT SOME ERROR

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

namespace sample
{
    class tr=new translation();
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {

        }
    }
}

Error is :-

Error	3	{ expected	C:\Users\arun\Documents\Visual Studio 2005\Projects\sample\sample\Form1.cs	11	13	sample<br />
Error	4	Invalid token '=' in class, struct, or interface member declaration	C:\Users\arun\Documents\Visual Studio 2005\Projects\sample\sample\Form1.cs	11	13	sample<br />
Error	5	Class, struct, or interface method must have a return type	C:\Users\arun\Documents\Visual Studio 2005\Projects\sample\sample\Form1.cs	11	18	sample<br />
Error	6	} expected	C:\Users\arun\Documents\Visual Studio 2005\Projects\sample\sample\Form1.cs	24	2	sample


What is this error?

Please Help me

Arunkumar.T
GeneralRe: Please Help me Pin
Pete O'Hanlon4-Dec-11 21:13
mvePete O'Hanlon4-Dec-11 21:13 
GeneralRe: Please Help me Pin
Wayne Gaylard4-Dec-11 21:17
professionalWayne Gaylard4-Dec-11 21:17 
GeneralRe: Please Help me Pin
Arunkumar.Koloth5-Dec-11 1:34
Arunkumar.Koloth5-Dec-11 1:34 
GeneralRe: Please Help me Pin
Wayne Gaylard5-Dec-11 1:43
professionalWayne Gaylard5-Dec-11 1:43 
QuestionDatabase Not Opening Pin
AmbiguousName4-Dec-11 2:55
AmbiguousName4-Dec-11 2:55 
AnswerRe: Database Not Opening Pin
Dan Mos4-Dec-11 3:15
Dan Mos4-Dec-11 3:15 
AnswerRe: Database Not Opening PinPopular
Wonde Tadesse4-Dec-11 8:19
professionalWonde Tadesse4-Dec-11 8:19 
GeneralRe: Database Not Opening Pin
Dan Mos4-Dec-11 8:54
Dan Mos4-Dec-11 8:54 
QuestionBind ReportViwer to DataSource dynamically Pin
Software20073-Dec-11 22:31
Software20073-Dec-11 22:31 
AnswerRe: Bind ReportViwer to DataSource dynamically Pin
preetham gd5-Dec-11 3:22
preetham gd5-Dec-11 3:22 
GeneralRe: Bind ReportViwer to DataSource dynamically Pin
Software20075-Dec-11 4:40
Software20075-Dec-11 4:40 
QuestionC# remoting with Sql server and store recordset Pin
kornkimhour2-Dec-11 22:31
kornkimhour2-Dec-11 22:31 
AnswerRe: C# remoting with Sql server and store recordset Pin
DaveyM693-Dec-11 12:55
professionalDaveyM693-Dec-11 12:55 
Questionget type of anonymous list Pin
zeeShan anSari2-Dec-11 9:30
zeeShan anSari2-Dec-11 9:30 
AnswerRepost Pin
Not Active2-Dec-11 9:44
mentorNot Active2-Dec-11 9:44 
AnswerRe: get type of anonymous list Pin
Wonde Tadesse2-Dec-11 16:48
professionalWonde Tadesse2-Dec-11 16:48 
QuestionIncluding an additional enum property into an object? Pin
Goalie352-Dec-11 9:20
Goalie352-Dec-11 9:20 

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.