C# Programing FAQ - Post here

asachan

Member
Apr 11, 2009
1,636
3
0
Athurugiriya
Faulkner said:
VS.NET 2010 vala C# gana dannavada.?? .NET frame work 4 enna kiyanne athtada

Yeah 2010 wala C# integrated. but i don't think it will come as separate bundle. cos of wpf . in order to Develop WPF apps and Integrate them with C# it requires WPF and C# in same place. so VS 2010 will come as a bundle not saparately. but this is not confirmed machan.

yeah Freamwork 4 will came with 2010 and there will be a major change with C# and C++ . MS deside to tide lease those two and put deep Combination and cross compatable for those two. which mean i think you can convert C# Projects in to C++ and visa versa.
 

whizzkid

Well-known member
  • Feb 21, 2009
    2,643
    172
    63
    asachan said:
    Yes machan thankx

    can we develop a Java Development environment Using C#? is it possible?


    Yes, it's definitely possible...Some of the Java IDEs are developed in C++... :)

    and the best thing is that java compiler for windows is written in C++... :) so ultimately an IDE invokes that Java compiler to build the program... so u can write an IDE in C# coz u can invoke that java compiler... (U don't need to know C++ to invoke Java compiler,, u can invoke it using a msdos command which is "javac") programatically...

    E.g. C:/ javac Test.java

    I can remember that about 2 years ago I created a small App which is a small IDE where we can write Java code, compile and see the output from it... :) When I was developing that gradually I realized that no point of writing an IDE any further coz it's just reinventing the wheel..coz there are lots of IDEs are available...So I abandoned that silly thing... ;)
     
    Last edited:

    asachan

    Member
    Apr 11, 2009
    1,636
    3
    0
    Athurugiriya
    whizzkid said:
    Yes, it's definitely possible...Some of the Java IDEs are developed in C++... :)

    and the best thing is that java compiler for windows is written in C++... :) so ultimately an IDE invokes that Java compiler to build the program... so u can write an IDE in C# coz u can invoke that java compiler... (U don't need to know C++ to invoke Java compiler,, u can invoke it using a msdos command which is "javac") programatically...

    E.g. C:/ javac Test.java

    I can remember that about 2 years ago I created a small App which is a small IDE where we can write Java code, compile and see the output from it... :) When I was developing that gradually I realized that no point of writing an IDE any further coz it's just reinventing the wheel..coz there are lots of IDEs are available...So I abandoned that silly thing... ;)


    You damn fool man ............ why u gave up?
    Ok how many we browsers are there now?
    But the Chrome (Google's new one) came by. cos it has some nice different things than Flock or Firefox has!!!!!!!!!!!!! . come on man bring that project now and start developing. as i know there is a lot of tiny IDE's there for java rather than big guns (I mean netbeans). so you can have a chance to make your IDE bring to front. all we want is Self Motive that i make My IDE became top one day.

    SO make a Proper plan for the Development and stick to it no matter what comes next. May be some one tell you it's useless , or you may feel it's useless , and u feel u are no match than those big guns , but don't give up . develop as much as u can and the time being u can do much more

    I also tried to develop a C# coder but the C# iDE has build in Functionality for Code domains and Compiler Introp. in that case i try to develop a Java compiler and still working on it. i got those same feelings but i will never give up.





     

    whizzkid

    Well-known member
  • Feb 21, 2009
    2,643
    172
    63
    Thnks for yor comments man...

    I began a really cool project in march, 2008! That's what I'm continuing now... It's an internet cafe system.... Completely developed in Java (PC shutdown, restart things are implemented in C++ code based libraries..) ... It's my dream...Now I have a working system and currently in a some sort of a bug fixing and fine tuning phase... ;) I ll make it more and more feature rich...lets see... ;)
     

    asachan

    Member
    Apr 11, 2009
    1,636
    3
    0
    Athurugiriya
    whizzkid said:
    Thnks for yor comments man...

    I began a really cool project in march, 2008! That's what I'm continuing now... It's an internet cafe system.... Completely developed in Java (PC shutdown, restart things are implemented in C++ code based libraries..) ... It's my dream...Now I have a working system and currently in a some sort of a bug fixing and fine tuning phase... ;) I ll make it more and more feature rich...lets see... ;)

    Hehehe
    My recent development is a Custome Software for Supply chain management for Garment factory. It's ummm a big software machan can handle every thing in a garment except pattern design and Printing

    Take a look at it here. this is not a complete web page , still under development

    http://www.softprofix.com/products/Strim/index.html
     

    asachan

    Member
    Apr 11, 2009
    1,636
    3
    0
    Athurugiriya
    ¤--bACarDi--¤ said:
    Machan Uba kohenda C# Learn kaley....???

    Thaniyama
    U should try to learn it . but untill you know basics learn from some one else. May be here u have a better chance to do it

    We can't teach you every thing. but we can help you . so u have to get some idea and if anything not clear ask .

     

    ¤--bACarDi--¤

    Well-known member
  • Jan 9, 2009
    12,130
    288
    83
    124.43.xxx.xxx
    asachan said:

    Thaniyama
    U should try to learn it . but untill you know basics learn from some one else. May be here u have a better chance to do it

    We can't teach you every thing. but we can help you . so u have to get some idea and if anything not clear ask .


    Thankx man.... I'll try... ;) ;)
    U r doing great work keep it up...
     

    asachan

    Member
    Apr 11, 2009
    1,636
    3
    0
    Athurugiriya
    Jack_Sparrow said:
    anna ela wede mama owa danne neee ;)

    There is a lot of type of connection and vast varity of DataBases are there.So here is how we can connect to a SQL database

    Simple Connection Using .NET SQL DLL's
    =============================

    First you need to import
    SqlClient ;
    =========================
    using System.Data.SqlClient;

    Then you need to Create a Connection to the database
    =======================================

    With out Authentication
    -------------------------
    string conn = "server=KEVOL;database=StudentInfo;Integrated Security=true";

    KEVOL = server name;
    StudentInfo = database name;


    With Authentication
    ---------------------

    string conn = server = KEVOL;database = StudentInfo;uid = sa;pwd = 5j55j";
    KEVOL = server name;
    StudentInfo = database name;
    sa = username
    5j55j = Password



    Test your connection
    ====================

    SqlConnection scon = new
    SqlConnection(conn);
    scon.Open();

    Compact it to one Line(Advanced stuff)
    ======================================
    SqlConnection scon = new SqlConnection(conn).Open();


    To be Continue....

    Guys What do you want next??
    Ask questions

     

    asachan

    Member
    Apr 11, 2009
    1,636
    3
    0
    Athurugiriya
    hiran108 said:
    Microsoft agent asp.net web form ekata add karanne kohomada ?

    Things required, where to get and how to install

    1. You have to add reference AgentObjects.dll and AgentServerObjects.dll. You can get this two DLLs from F:\Program Files\Microsoft Visual Studio .NET\ FrameworkSDK\Samples\Technologies\Interop\Applications\MSAgent\AgentExplorer. Bear in mind, you have installed .NET in F:. Or Just go to F:\Program Files\Microsoft Visual Studio .NET\FrameworkSDK\Samples\Technologies\Interop\Applications\MSAgent\Hello1 and take a look at read me.htm file how to get those DLLs. You just give, nmake all. This command will create AgentObjects.dll and AgentServerObjects.dll in hello1 folder.
      Or just use those DLLs from this setup. I have bind these DLLs with this setup.
      Assure those 2 DLLs in bin debug/release folder and add reference to solution explorer in you project.
    2. We have to put .acs in debug or release folder. Announcer will show error if .acs file is not there. You can get four .acs files from http://www.microsoft.com/msagent/downloads/user.asp. There you get genie, Merlin, Peedy and Robby, Microsoft agent character files (.acs)
      and put into release or debug folder.
    3. Just download and open the MicrosoftAgentApplication.sln file to use it. Before run this, you have to install Text to speech engine. Download Text-to-Speech Engineer tv_enua.exe American English - 1 MB from here http://www.microsoft.com/msagent/downloads/user.asp. I could not add this with my demo setup due to size restriction.
      Just click tv_enua.exe to install. Then announcer is ready to announce anything, sing a song and tell a joke.
    Sample Code

    using System.Data;
    using System.Drawing;
    using System.Reflection;
    using System.Collections;
    using System.Windows.Forms;
    using System.ComponentModel;
    using System.Runtime.InteropServices;
    using AgentObjects;
    using AgentServerObjects;


    If you install right Agent DLLs you and u add References to
    that this will come Nice and easy
    Before we make a function to create an error files, we have to declare some variables that will be used in our function. This is an example of variables declaration and the main function is ErrorRoutine.

    AgentServer Srv = new AgentServer(); //Create a agent server

    //If unable to create show the error

    if (Srv == null)
    {
    MessageBox.Show("ERROR: Agent Server couldn't be started!");
    }

    IAgentEx SrvEx;

    // The following cast does the QueryInterface to

    //fetch IAgentEx interface from the IAgent interface,

    //directly supported by the object

    SrvEx = (IAgentEx) Srv;

    // First try to load the default character

    int dwCharID=0, dwReqID=0;
    try
    {
    // null is used where VT_EMPTY variant is expected by the COM object

    String strAgentCharacterFile = null;
    //Check microsoft agent character filename(.acs) is empty

    if (!strFileName.Equals(string.Empty))
    {
    //Get the acs path

    strAgentCharacterFile = strPath + strFileName;
    }
    else
    {
    MessageBox.Show("Select Style");
    return;
    }

    if (!TxtSpeakInput.Text.Equals(string.Empty))
    {
    //load the acs file

    SrvEx.Load(strAgentCharacterFile, out dwCharID, out dwReqID);
    }
    else
    {
    MessageBox.Show("Enter Text");
    return;
    }
    }
    catch (Exception)
    {
    MessageBox.Show("Failed to load Agent character! Exception details:");
    }

    IAgentCharacterEx CharacterEx=null;
    SrvEx.GetCharacterEx(dwCharID, out CharacterEx);
    //CharacterEx.SetLanguageID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US));


    // Show the character. The first parameter tells Microsoft

    // Agent to show the character by playing an animation.

    CharacterEx.Show(0, out dwReqID);

    // Make the character speak

    // Second parameter will be transferred to the COM object as NULL

    CharacterEx.Speak(TxtSpeakInput.Text, null, out dwReqID);
    }
     

    digitaldjs

    Member
    Aug 11, 2007
    926
    36
    0
    .Net framework is only 20MB the other version wich is 175MB is the SDK version, if you need to distribute a c# program you need only the runtime version(20MB) to run your application on client pcs.
     

    asachan

    Member
    Apr 11, 2009
    1,636
    3
    0
    Athurugiriya
    digitaldjs said:
    .Net framework is only 20MB the other version wich is 175MB is the SDK version, if you need to distribute a c# program you need only the runtime version(20MB) to run your application on client pcs.

    Yeah machan
    I case you haven't noise that 175 SDK require for advance GDI+ Programing and Crystal Report Integrations. they are not Precomplied DDLs machan. Runtime version only got DLL's and Icon Set.

    EX: If you make a pattern design software for a Garment, it require DX9 or 10 Programing interface, Grapix , Textures , and Client DLLs So with the basic runtime you only got DLL's . so in that case you need full SDK.

    But basic applications you only need Runtime. and Vista latest you don't even need runtime cos it's integrated.