question

SaeedPooladzadeh-4680 avatar image
0 Votes"
SaeedPooladzadeh-4680 asked Viorel-1 answered

Why I see red line under this statement

Hello,

When I want to use these lines I encounter a red line under seek and copy to. And

Warns me up "Are you missing a directive"?
What should I do?

  var state = _instaApi.GetStateDataAsString();
                
    
             using (var fileStream = File.Create(stateFile))
             {
                 state.Seek(0, SeekOrigin.Begin);
                 state.CopyTo(fileStream);
             }

Thanks,

dotnet-csharpdotnet-aspnet-core-generaldotnet-aspnet-core-blazordotnet-aspnet-mvc
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

Viorel-1 avatar image
0 Votes"
Viorel-1 answered

I think that you should do this:

 var state = _instaApi.GetStateDataAsString( );
 File.WriteAllText( stateFile, state);


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.