C# Visual Studio

0cean

Member
May 25, 2017
841
58
0
N/A
Hard Drive eke thiyana file ekak api hadapu application eken open karama e open karapu file eke details (location, etc) ganne kohomada?

open-with.gif


Hithanna desktop eke text file ekak thiyanawa kiyala.
Eka double click karama normal open wenne Notepad eken.
Apita Notepad eken nathuwa Notepad++ wage wena application ekakin open karaganna ona unama api open with... gihilla adala application eka select karagannawa.

Mata ona mama hadapu application ekakin me text file eka open karaganna.
Meka open karaddi me file ekata adala details (location, file name, etc) ganne kohomada...?

Mata ona me details aragena file eke name, location wage dewal console eke pennanam, mekata hari yana widiyata C# code eka hadaganne kohomada...?
 

CorD SaC

Well-known member
  • Feb 4, 2015
    15,724
    28,085
    113

    0cean

    Member
    May 25, 2017
    841
    58
    0
    N/A
    වින්ඩෝස් රෙජිස්ට්‍රියත් එක්ක ඩීල් වෙන වැඩක්.දැන්නම් ඇඳේ ඉන්නෙ.මේක බලපන් මචන් සෙට් වෙනවද කියලා


    https://stackoverflow.com/questions...work-as-the-default-program-for-certain-files

    https://stackoverflow.com/questions/6179562/adding-my-program-to-right-click-menu

    Meka set wenawa wage bn. Mama balannam. registry eka use nokara normal portable app ekak widiyata hadaganna puluwan unanam hugak hodayi.

    (Mata right click menu ekata mukuth add karanna ona naha.)
     

    slickdeath

    Well-known member
  • Sep 3, 2014
    3,345
    1,620
    113
    FileInfo class eka use karanna. System.IO namespace eke thiyenne
     
    Last edited:

    0cean

    Member
    May 25, 2017
    841
    58
    0
    N/A
    Mekayi ona wela thibune. Path eka witharayi danata ganna danne. :yes:

    Code:
    static void Main(string[] args)
    {
          string path = args[0];
    
          Console.WriteLine(path);
          Console.ReadKey();
    }
     
    Last edited: