sitestudio / otest

Test SKGithubTest app
MIT License
0 stars 0 forks source link

STUDENTPUB #228

Open sitestudio opened 1 month ago

sitestudio commented 1 month ago

In C# provide example of calling a method in the STUDENTPUB App Catalog group

skgithubtest[bot] commented 1 month ago
#!/bin/bash

# Create a directory for the STUDENTPUB App Catalog group example
mkdir -p STUDENTPUB_App_Catalog

# Create a C# file to demonstrate calling a method in the STUDENTPUB App Catalog group
cat <<EOL > STUDENTPUB_App_Catalog/StudentPubExample.cs
using System;

namespace StudentPubApp
{
    public class Student
    {
        // Method to display student information
        public void DisplayInfo(string name, int age)
        {
            Console.WriteLine($"Student Name: {name}, Age: {age}");
        }
    }

    class Program
    {
        static void Main(string[] args)
        {
            // Create an instance of the Student class
            Student student = new Student();

            // Call the DisplayInfo method with sample data
            student.DisplayInfo("John Doe", 20);
        }
    }
}
EOL

# Inform the user that the files have been created
echo "C# example file created in the STUDENTPUB_App_Catalog directory."