Click here to Skip to main content
15,915,094 members
Home / Discussions / C#
   

C#

 
QuestionCan Somone answer my question? Pin
DeepToot12-Jul-05 5:38
DeepToot12-Jul-05 5:38 
AnswerRe: Can Somone answer my question? Pin
MoustafaS12-Jul-05 11:27
MoustafaS12-Jul-05 11:27 
GeneralRe: Can Somone answer my question? Pin
DeepToot12-Jul-05 11:43
DeepToot12-Jul-05 11:43 
GeneralSave image as CMYK Pin
F_A_C12-Jul-05 5:23
F_A_C12-Jul-05 5:23 
Generalpointer in C# Pin
amitmohanty12-Jul-05 4:59
amitmohanty12-Jul-05 4:59 
GeneralRe: pointer in C# Pin
Judah Gabriel Himango12-Jul-05 5:02
sponsorJudah Gabriel Himango12-Jul-05 5:02 
GeneralRe: pointer in C# Pin
amitmohanty12-Jul-05 5:10
amitmohanty12-Jul-05 5:10 
GeneralRe: pointer in C# Pin
Judah Gabriel Himango12-Jul-05 5:43
sponsorJudah Gabriel Himango12-Jul-05 5:43 
Unsafe code is

  • code that cannot be verified as type-safe by the .NET Common Language Runtime (CLR).
  • is not Common Language Specification (CLS)-compliant, meaning that other .NET languages like VB.NET, J#, and so on are not required to implement nor are they guaranteed to consume such code, if it were declared as public and made available to other .NET dlls & executables.
  • requires a full trust security scenario in order to run, for instance, it must be installed/run from the target machine; if you try to use pointers in code run in a partial-trust scenario (e.g. a C# applet over the internet), the .NET CLR will throw a SecurityException because pointers require full access to the machine's memory, thus are potentially dangerous to the end user.
  • For a function, class, or code block to be unsafe, just use the unsafe keyword:

    unsafe class MyClass
    {
    }
    
    unsafe void MyFunction()
    {
    }
    
    void MyFunctionWithUnsafeBlock
    {
    
    unsafe
    {
    }
    
    }


    Despite all these cautions, you're free to use pointers as much as you like if your application is a standalone app or dll, indeed, the .NET framework uses pointers internally quite often for performance gains and interop scenarios.

    Tech, life, family, faith: Give me a visit.
    I'm currently blogging about: Homosexuality in Christianity
    Judah Himango


GeneralRe: pointer in C# Pin
Guffa12-Jul-05 5:53
Guffa12-Jul-05 5:53 
GeneralRe: pointer in C# Pin
amitmohanty12-Jul-05 6:03
amitmohanty12-Jul-05 6:03 
GeneralRe: pointer in C# Pin
Guffa12-Jul-05 6:45
Guffa12-Jul-05 6:45 
GeneralRe: pointer in C# Pin
amitmohanty12-Jul-05 6:49
amitmohanty12-Jul-05 6:49 
GeneralRe: pointer in C# Pin
Guffa12-Jul-05 7:39
Guffa12-Jul-05 7:39 
GeneralRe: pointer in C# Pin
3Dizard12-Jul-05 7:09
3Dizard12-Jul-05 7:09 
GeneralExcel Reporting using a Template Pin
Alomgir Miah12-Jul-05 4:34
Alomgir Miah12-Jul-05 4:34 
GeneralEventhandler Pin
pssuresh12-Jul-05 4:12
pssuresh12-Jul-05 4:12 
GeneralRe: Eventhandler Pin
S. Senthil Kumar12-Jul-05 4:39
S. Senthil Kumar12-Jul-05 4:39 
GeneralRe: Eventhandler Pin
Gavin Jeffrey12-Jul-05 4:43
Gavin Jeffrey12-Jul-05 4:43 
GeneralRe: Eventhandler Pin
Judah Gabriel Himango12-Jul-05 4:57
sponsorJudah Gabriel Himango12-Jul-05 4:57 
GeneralRe: Eventhandler Pin
J4amieC12-Jul-05 5:52
J4amieC12-Jul-05 5:52 
GeneralDatakeyfield in Datagrid Pin
livez12-Jul-05 4:07
livez12-Jul-05 4:07 
GeneralPessimistic locking Pin
rmedo12-Jul-05 3:47
rmedo12-Jul-05 3:47 
GeneralRe: Pessimistic locking Pin
Dave Kreskowiak12-Jul-05 5:56
mveDave Kreskowiak12-Jul-05 5:56 
GeneralWi-fi Pin
jonty1912-Jul-05 3:34
jonty1912-Jul-05 3:34 
GeneralRe: Wi-fi Pin
Dave Kreskowiak12-Jul-05 5:55
mveDave Kreskowiak12-Jul-05 5:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.