C# Sample

Could someone please post a simple c# sample, complete, from top to bottom.

 

I am trying to code a simple code event. Do I use a class statement? Do I need a Main? I can't find anything, so I tried ordinary c#, like this, but it doesn't work:

 

class Get76Data
{
    public static int Main(string[] args)
    {
        CaseMgmtProcData.AlaAcct        = 987654321; 
        CaseMgmtProcData.TexAcct        = BPM76_CaseMgmt1.TexAcct;
        ...

Tagged:

Comments

  • Are you talking about a code activity within the visual scripting environment?  If so, you shouldn't need any function names or class statements...simply type the C# code that you would like to execute.  Note that you cannot use any "using" statements though.  If you need to do that, you can write a C# server script, which can have functions, classes, using statements, etc.  Then from your code visual script activity, write some C# to call the function that exists within the server script (or you can promote the server script functions to the expression builder or visual script toolbox directly, so that you don't need to use a code activity to call the functions)

     

    hope that clears things up.

  • Do you surround the whole thing in curly brackets, { } ?

     

    Yes, I am  talking about a code activity within the visual scripting environment.

  • no brackets required, simply write the code that you want to execute.

  •  

    There are a number of complete samples here

    http://metastorm.processmapping.com.au/?forum=160575


    RKushner wrote:

    Could someone please post a simple c# sample, complete, from top to bottom.

     

    I am trying to code a simple code event. Do I use a class statement? Do I need a Main? I can't find anything, so I tried ordinary c#, like this, but it doesn't work:

     

    class Get76Data
    {
        public static int Main(string[] args)
        {
            CaseMgmtProcData.AlaAcct        = 987654321; 
            CaseMgmtProcData.TexAcct        = BPM76_CaseMgmt1.TexAcct;
            ...