Tech
Forums
Jobs
Books
Events
Videos
Conference
Annual Conference
Bcrypt
Ai Conference
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
5
Answers
Unsafe code
Ask a question
Ask a question
Upload Source Code:
Select only zip and rar file.
Maha
10y
1.2k
1
Reply
This program (1st one) is given in the following website.
http://www.dotnetperls.com/unsafe
When I tried to compile error message is "Unsafe code may only appear if compiling with /unsafe". Please explain the reason.
using System;
class Program
{
unsafe static void Main()
{
fixed (char* value = "sam")
{
char* ptr = value;
while (*ptr != '\0')
{
Console.WriteLine(*ptr);
++ptr;
}
}
}
}
Post
Reset
Cancel
Answers (
5
)
Next Recommended Forum
OCR Converted File save Into Database Fields Formats
Autocomplete textbox in Mdi child form c#