Click here to Skip to main content
15,903,854 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
AnswerRe: I am working on Windbg to analyse Pin
Richard MacCutchan25-Jan-11 3:05
mveRichard MacCutchan25-Jan-11 3:05 
QuestionHow to display an image on a activex webpage Pin
simon alec smith23-Jan-11 1:42
simon alec smith23-Jan-11 1:42 
AnswerRe: How to display an image on a activex webpage Pin
N a v a n e e t h24-Jan-11 6:09
N a v a n e e t h24-Jan-11 6:09 
QuestionGPS Support Pin
Ger Hayden13-Jan-11 22:10
Ger Hayden13-Jan-11 22:10 
AnswerRe: GPS Support Pin
jschell14-Jan-11 10:15
jschell14-Jan-11 10:15 
QuestionShow form minimized. Pin
TheBerk13-Jan-11 9:17
TheBerk13-Jan-11 9:17 
AnswerRe: Show form minimized. Pin
Richard MacCutchan13-Jan-11 10:41
mveRichard MacCutchan13-Jan-11 10:41 
QuestionGeneric Cyclic List Default Property [modified] Pin
Jason Titcomb6-Jan-11 0:59
Jason Titcomb6-Jan-11 0:59 
I cannot get the syntax for the cyclic list class I am working on.
In the following class you see that I have a property named CycItem.
This works, but I would like to have it be the default indexer so I can just use Item or [].
Any help would be great.
#pragma once
using namespace System;
using namespace System::Collections::Generic;
using namespace System::Reflection;
namespace MG_Geo {
	generic <typename T>
	public ref class CycList: public List<T>
	{
		// Methods
	public:
		CycList()
		{
		}
		//property
		property T CycItem [int] 
		{
			T get(int index) {
				if (this->Count==0)
				{
					throw gcnew IndexOutOfRangeException("IndexOutOfRange Count = 0");
				}

				while (index < 0)
				{
					index = (this->Count + index);
				}
				if (index >= this->Count)
				{
					index = (index % this->Count);
				}
				return this[index];
			}

			void set(int index, T value) {
				if (this->Count==0)
				{
					throw gcnew IndexOutOfRangeException("IndexOutOfRange Count = 0");
				}

				while (index < 0)
				{
					index = (this->Count + index);
				}
				if (index >= this->Count)
				{
					index = (index % this->Count);
				}
				this[index] = *value;
			}    
		}
	};
}


modified on Friday, January 7, 2011 6:22 AM

AnswerRe: Generic Cyclic List Default Property Pin
N a v a n e e t h10-Jan-11 1:14
N a v a n e e t h10-Jan-11 1:14 
QuestionMessage Removed Pin
5-Jan-11 22:32
lucky_12215-Jan-11 22:32 
Answercross-post alert Pin
Luc Pattyn6-Jan-11 2:11
sitebuilderLuc Pattyn6-Jan-11 2:11 
QuestionNeed to pass private member of a Class as a argument to function of another class Pin
ptr_Electron4-Jan-11 21:36
ptr_Electron4-Jan-11 21:36 
AnswerRe: Need to pass private member of a Class as a argument to function of another class Pin
Ger Hayden4-Jan-11 22:58
Ger Hayden4-Jan-11 22:58 
AnswerRe: Need to pass private member of a Class as a argument to function of another class Pin
Richard MacCutchan5-Jan-11 0:46
mveRichard MacCutchan5-Jan-11 0:46 
GeneralRe: Need to pass private member of a Class as a argument to function of another class Pin
Luc Pattyn5-Jan-11 3:00
sitebuilderLuc Pattyn5-Jan-11 3:00 
GeneralRe: Need to pass private member of a Class as a argument to function of another class Pin
Richard MacCutchan5-Jan-11 7:15
mveRichard MacCutchan5-Jan-11 7:15 
AnswerRe: Need to pass private member of a Class as a argument to function of another class [modified] Pin
Paul Michalik6-Jan-11 1:17
Paul Michalik6-Jan-11 1:17 
AnswerRe: Need to pass private member of a Class as a argument to function of another class Pin
gammagtmw24-Jan-11 23:44
gammagtmw24-Jan-11 23:44 
Questionget the delagate via property Pin
ptr_Electron4-Jan-11 1:03
ptr_Electron4-Jan-11 1:03 
AnswerRe: get the delagate via property Pin
John Schroedl4-Jan-11 4:33
professionalJohn Schroedl4-Jan-11 4:33 
GeneralRe: get the delagate via property Pin
ptr_Electron4-Jan-11 18:14
ptr_Electron4-Jan-11 18:14 
GeneralRe: get the delagate via property Pin
John Schroedl5-Jan-11 3:06
professionalJohn Schroedl5-Jan-11 3:06 
QuestionXmlSerializer 's Deserialize method crashs when running with purify Pin
ptr_Electron27-Dec-10 19:37
ptr_Electron27-Dec-10 19:37 
AnswerRe: XmlSerializer 's Deserialize method crashs when running with purify Pin
jschell2-Jan-11 9:14
jschell2-Jan-11 9:14 
GeneralRe: XmlSerializer 's Deserialize method crashs when running with purify Pin
ptr_Electron4-Jan-11 1:38
ptr_Electron4-Jan-11 1:38 

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.