Does C#.net support Pointers? - Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more
Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more
Go Back   Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more > Webmaster Tech > Programming > Other Programming - Perl, C++, Java, ASP, .NET Development

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 02-15-2010, 05:40 AM   #1 (permalink)
Junior Member
 
Join Date: Feb 2010
Posts: 36
Question Does C#.net support Pointers?

Does C#.net support Pointers?
i have just started learning C#.
Thank u.
luky is offline   Reply With Quote
Sponsored Links
Old 03-05-2010, 02:41 PM   #2 (permalink)
Junior Member
 
Join Date: Mar 2010
Location: NYC
Posts: 9
Default Re: Does C#.net support Pointers?

Sure, it still supports pointers. It's not advisable to use them, unless you really know what you're doing.
accwebworks is offline   Reply With Quote
Old 03-08-2010, 06:45 AM   #3 (permalink)
Junior Member
 
Join Date: Feb 2010
Posts: 36
Default Re: Does C#.net support Pointers?

Thank u so much for your sharing.
Can you give me a short example of pointer?
luky is offline   Reply With Quote
Old 03-08-2010, 10:30 AM   #4 (permalink)
Junior Member
 
Join Date: Mar 2010
Location: NYC
Posts: 9
Default Re: Does C#.net support Pointers?

If you're going to use pointers in c# you have to put it in unsafe code block like this:

unsafe
{
int a = 1;
int *ptr1 = &a;

Console.WriteLine((int)ptr1);

}
accwebworks is offline   Reply With Quote
Old 03-09-2010, 04:21 AM   #5 (permalink)
Junior Member
 
Join Date: Feb 2010
Posts: 36
Default Re: Does C#.net support Pointers?

So nice of u thank u so much
luky is offline   Reply With Quote
Old 03-18-2010, 10:16 AM   #6 (permalink)
Junior Member
 
Join Date: Mar 2010
Posts: 17
Default Re: Does C#.net support Pointers?

C# support pointers
example:
type* identifier;
void* identifier; //allowed but not recommended
jakkevin4v is offline   Reply With Quote
Old 03-19-2010, 07:33 AM   #7 (permalink)
Junior Member
 
Join Date: Nov 2009
Posts: 10
Default Re: Does C#.net support Pointers?

C# does support pointers but it is not advisable to use them. but if does offer reference programming using various features like delegates(a strongly typed reference pointer) or reference variable - ref when using pointers in functions.
jamesross.mac1 is offline   Reply With Quote
Old 04-25-2010, 10:15 PM   #8 (permalink)
Junior Member
 
Join Date: Apr 2010
Posts: 7
Angry Hi,

Thanks for sharing!!!!!!!!!
Jackmly231 is offline   Reply With Quote
Old 04-26-2010, 08:29 AM   #9 (permalink)
Junior Member
 
casius's Avatar
 
Join Date: Apr 2010
Posts: 25
Default Re: Does C#.net support Pointers?

Hello,

C#.net doesnt support pointers directly because the security purpose.
Only unsafe code and pointers enable C# to be used to make applications that you may usually connect with C++: high-performance, systems code. In addition, the insertion of unsafe code and pointers provide C# capabilities that are missing in Java.
casius is offline   Reply With Quote
Old 05-19-2010, 11:50 AM   #10 (permalink)
Junior Member
 
Join Date: May 2010
Posts: 15
Default Re: Does C#.net support Pointers?

Quote:
Originally Posted by casius View Post
Hello,

C#.net doesnt support pointers directly because the security purpose.
Only unsafe code and pointers enable C# to be used to make applications that you may usually connect with C++: high-performance, systems code. In addition, the insertion of unsafe code and pointers provide C# capabilities that are missing in Java.
C#.net does support pointers, but it's not recommended to use.

Use java instead, java provides more features than normal programming languages.
Generation is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Sponsors

» Links

» Affiliates
Web Hosting
Online Backup Reviews
Marketing Find
Merchant Select
SiteMap Builder
Host Compare

» Links

» Sports Network
Paintball Forum
Football Forum
Hockey Forum
Golf Forum
Boxing Forum
Lacrosse Forum
Baseball Forum
SnowBoarding Forum
Soccer Forum
MMA Forum


All times are GMT -4. The time now is 09:44 PM.


Powered by vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.2
Webmaster Forums
Web Hosting | Chicago Web Hosting | Web Hosting