Showing posts with label C#. Show all posts
Showing posts with label C#. Show all posts

December 07, 2020

C# get windows user app data folder path

 Hi folks,

Today I will explain to get the folder path of the windows user specific app data for storing any program (app) based information in C# (.NET Framework, .NET CORE, .NET 5)


Source

using System;

using System.IO;

namespace NETFrameworkConsoleApp1

{

    class Program

    {

        static void Main(string[] args)

        {

            string dir = Path.Combine(

                Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData),

                "FolderName"

            );

            Console.WriteLine("User Appdata Path: \n " + dir);

            Console.ReadLine();

        }

    }

}


Hope this helps you to customize your requirement.

References

https://docs.microsoft.com/en-us/dotnet/api/system.environment?view=net-5.0

Please share your comments and feedback to psrdotcom@gmail.com


November 27, 2019

Virtual Reality (VR), Augmented Reality (AR), 3D Application Development Tools and Platforms

Hi folks,

Most of the developers think Unity is only the development platform to develop Virtual Reality (VR), Augmented Reality (AR), 3D Applications.

Here is the list which might be useful you to explore based on your skillset.


  1. Unity - C#
  2. Unreal - C++
  3. Apple SceneKit - Swift / Objective-C
  4. Google Sceneform - Android
  5. Amazon Sumerian - JavaScript
  6. Babylon - JavaScript - Try online Playground
  7. A-Frame - HTML JavaScript
  8. Three - JavaScript - Examples
Hope this information is useful for you to create your own applications based on your knowledge.

Make your dreams to real using the VR, AR, 3D technologies.

Please send your feedback and comments to psrdotcom@gmail.com

April 06, 2011

Compile and Execute C# (C sharp) code without Visual Studio and with .NET Framework

Hi everyone,

Today I have come across executing C# (C Sharp) code with out Visual Studio, but you must have .NET Framework installed on your computer.

Procedure:

  1. Install .NET Framework, if not installed.
  2. Set the path of the .NET Framework Edition in environment variables or by using SET PATH command.
  3. ex: C:\Windows\Microsoft.NET\Framework\v3.5
  4. Write the C# script, Save file with extension .cs
    ex: D:\csharp\trail.cs
    using System;

    public class Example
    {
        public static void Main()
        {
            Console.Write("\nIts Done\n");

            Console.ReadLine(); //Waits until user press Return
    (Enter) key
        }
    }
  5. Open command prompt, change the directory to specified folder(ex: D:\csharp\)
  6. Execute the following command
  7. cmd> csc trail.cs
  8. We will get trail.exe in the specified folder(ex: D:\csharp\), if it executed successfully
  9. Double click the trail.exe and see the output.
  10. We have successfully executed C#(C sharp) code without visual studio and with .NET Framework only
References:
http://blogs.oberon.ch/tamberg/2007-10-17/compiling-csharp-without-visual-studio.html

Please post your comments and feedback.

Featured Post

Java Introdcution

Please send your review and feedback to psrdotcom@gmail.com