ईवेंट्स
17 मार्च, 9 pm - 21 मार्च, 10 am
साथी डेवलपर्स और विशेषज्ञों के साथ वास्तविक दुनिया के उपयोग के मामलों के आधार पर स्केलेबल एआई समाधान बनाने के लिए मीटअप श्रृंखला में शामिल हों।
अभी पंजीकरण करेंयह ब्राउज़र अब समर्थित नहीं है.
नवीनतम सुविधाओं, सुरक्षा अपडेट और तकनीकी सहायता का लाभ लेने के लिए Microsoft Edge में अपग्रेड करें.
The identifiers __LINE__
, __SOURCE_DIRECTORY__
and __SOURCE_FILE__
are built-in values that enable you to access the source line number, directory and file name in your code.
__LINE__
__SOURCE_DIRECTORY__
__SOURCE_FILE__
Each of these values has type string
.
The following table summarizes the source line, file, and path identifiers that are available in F#. These identifiers are not preprocessor macros; they are built-in values that are recognized by the compiler.
Predefined identifier | Description |
---|---|
__LINE__ |
Evaluates to the current line number, considering #line directives. |
__SOURCE_DIRECTORY__ |
Evaluates to the current full path of the source directory, considering #line directives. |
__SOURCE_FILE__ |
Evaluates to the current source file name, without its path, considering #line directives. |
For more information about the #line
directive, see Compiler Directives.
The following code example demonstrates the use of these values.
let printSourceLocation() =
printfn "Line: %s" __LINE__
printfn "Source Directory: %s" __SOURCE_DIRECTORY__
printfn "Source File: %s" __SOURCE_FILE__
printSourceLocation()
Output:
Line: 4
Source Directory: C:\Users\username\Documents\Visual Studio 2017\Projects\SourceInfo\SourceInfo
Source File: Program.fs
.NET प्रतिक्रिया
.NET एक ओपन सोर्स प्रोजेक्ट है. प्रतिक्रिया प्रदान करने के लिए लिंक का चयन करें:
ईवेंट्स
17 मार्च, 9 pm - 21 मार्च, 10 am
साथी डेवलपर्स और विशेषज्ञों के साथ वास्तविक दुनिया के उपयोग के मामलों के आधार पर स्केलेबल एआई समाधान बनाने के लिए मीटअप श्रृंखला में शामिल हों।
अभी पंजीकरण करें