Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Types which have no Namespace cause a compiler error #44

Open
sonnemaf opened this issue Jan 9, 2025 · 0 comments
Open

Types which have no Namespace cause a compiler error #44

sonnemaf opened this issue Jan 9, 2025 · 0 comments

Comments

@sonnemaf
Copy link

sonnemaf commented Jan 9, 2025

Types which have no Namespace cause a compiler error (Identifier expected)

image

using IDisposableGenerator;

//namespace Test;

[GenerateDispose(false)]
public partial class LogWriter  {

    [DisposeField(false)]
    private readonly StreamWriter _streamWriter;

    public LogWriter(string path) {
        _streamWriter = new StreamWriter(path);
    }

    public void WriteLine(string text) => _streamWriter.WriteLine(text.ToUpper());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant