Comments (2)
As far as I can tell by looking at the Reference Source and the documentation, you're right that EventLogInformation.Attributes
contains FileAttributes
, even though it's typed as int
.
But I don't think just code like the one you're showing is enough, an explanation about what the code does and why is also necessary.
Also, your code is unnecessarily complicated and won't work correctly if Attributes
is null
.
What do you say about the following?
The values of this property are the same as those of the
FileAttributes
type. To make working with this property easier, you can convert the value to that type using the following code:EventLogInformation eventLogInformation; FileAttributes? fileAttributes = (FileAttributes?)eventLogInformation.Attributes;
from dotnet-api-docs.
We agree with the suggestion to add this considering @svick's comments that it should consider the Nullable case. Putting in our backlog for now, but we'll gladly accept a PR.
from dotnet-api-docs.
Related Issues (20)
- Documentation on tooltip timings doesn't specify the unit HOT 2
- Assigning things into Data throws if the key or value isn't Serializable. this should be documented. HOT 1
- Inaccurate/incomplete documentation of some Convert.ToString functions HOT 1
- Same example HOT 3
- IConfigurationBuilder.Add(IConfigurationSource) HOT 2
- System.IO.Directory.GetFiles(string, string, EnumerationOptions) - parameter description incorrect HOT 2
- The IEqualityComparer<T> does not used in List<T>.Sort HOT 1
- JsonNode.DeepEquals仅在.net8及以上支持,但文档中显示所有版本均支持 HOT 1
- Document Tracing/Activity sampling HOT 5
- Replace use of String.Copy in code examples
- أوتاز HOT 1
- BitMap.GetPixel Documentation HOT 2
- StructLayoutAttribute.Pack Field should give an example of nested packing HOT 3
- Update API ref for .NET 9 Preview 6 HOT 1
- Update API ref for .NET 9 Preview 7 HOT 1
- Update API ref for .NET 9 RC 1 HOT 1
- Update API ref for .NET 9 RC 2 HOT 1
- Update API ref for .NET 9 GA HOT 1
- An example !!!!!!!!!!!!!!!!!!!!!!!!!!!! HOT 2
- Add security-related documentation to AssemblyBuilder and PersistedAssemblyBuilder
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dotnet-api-docs.