The parameter is incorrect

Arvind Kumar 20 Reputation points
2025-06-09T04:47:34.47+00:00

Hello Team,

I am following WinUINote App example gived in MSDN as URL mensioned below.

https://learn.microsoft.com/en-us/windows/apps/tutorials/winui-notes/

I am keeping file in Asset folder and accessing it. using run command able to open the file in given folder. but using code getting error "The parameter is incorrect".

Kindly help on this.

User's image

Thanks,

Arvind

Developer technologies | C#
0 comments No comments
{count} votes

Accepted answer
  1. Castorix31 90,686 Reputation points
    2025-06-09T06:50:33.0433333+00:00

    You have set full path name + file name instead of just file name for filename, like in tutorial :

    public sealed partial class NotePage : Page
    {
        private StorageFolder storageFolder = ApplicationData.Current.LocalFolder;
        private StorageFile? noteFile = null;
        private string fileName = "note.txt";
    
    
    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.