Click here to Skip to main content
15,887,083 members
Home / Discussions / C#
   

C#

 
GeneralRe: Unable to get connected users by Win32_ServerConnection!! Pin
Member 46594858-May-11 21:08
Member 46594858-May-11 21:08 
AnswerRe: Unable to get connected users by Win32_ServerConnection!! Pin
OriginalGriff8-May-11 21:18
mveOriginalGriff8-May-11 21:18 
GeneralRe: Unable to get connected users by Win32_ServerConnection!! Pin
Member 46594858-May-11 21:22
Member 46594858-May-11 21:22 
AnswerRe: Unable to get connected users by Win32_ServerConnection!! Pin
OriginalGriff8-May-11 21:29
mveOriginalGriff8-May-11 21:29 
GeneralRe: Unable to get connected users by Win32_ServerConnection!! Pin
OriginalGriff8-May-11 21:20
mveOriginalGriff8-May-11 21:20 
GeneralRe: Unable to get connected users by Win32_ServerConnection!! Pin
Member 46594858-May-11 21:25
Member 46594858-May-11 21:25 
QuestionGeneric linked list Pin
frofrofrofro7-May-11 5:56
frofrofrofro7-May-11 5:56 
AnswerRe: Generic linked list Pin
Luc Pattyn7-May-11 7:00
sitebuilderLuc Pattyn7-May-11 7:00 
Are you asking about your own implementation of LinkedList? There is one available in .NET since 2.0

This would be an example of its use:
public class CPTest_LinkedList : CPTest {
	public override void Test(int arg) {
		LinkedList<Person> persons=new LinkedList<Person>();
		foreach(string s in new string[]{"jef", "jan", "jos"}) persons.AddLast(new Person(s));
		foreach(Person p in persons) log(p.Name);
		foreach(Person p in persons) if (p.ID==1) log("person 1 = "+p.Name);
	}

	public class Person {
		public string Name;
		public int ID;
		public static int count=0;

		public Person(string name) { Name=name; ID=count++; }
	}
}


which outputs:
18:57:36.439    CPTest.log-59                        jef
18:57:36.453    CPTest.log-59                        jan
18:57:36.467    CPTest.log-59                        jos
18:57:36.479    CPTest.log-59                        person 1 = jan


Its use is pretty easy as it implements ICollection. The one thing you can't do with such LinkedList is indexing, as in persons[1] which works fine in array-based collections such as List<T> itself. Indexing in LinkedList requires scanning the list one node at a time.

Smile | :)
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.

modified on Saturday, May 7, 2011 2:46 PM

AnswerRe: Generic linked list Pin
PIEBALDconsult7-May-11 14:06
mvePIEBALDconsult7-May-11 14:06 
JokeRe: Generic linked list Pin
Peter_in_27807-May-11 19:48
professionalPeter_in_27807-May-11 19:48 
GeneralRe: Generic linked list Pin
Luc Pattyn8-May-11 23:51
sitebuilderLuc Pattyn8-May-11 23:51 
GeneralRe: Generic linked list Pin
Niklas L9-May-11 5:07
Niklas L9-May-11 5:07 
AnswerRe: Generic linked list Pin
AspDotNetDev7-May-11 19:53
protectorAspDotNetDev7-May-11 19:53 
Questionlicense for the installation Pin
fazadef6-May-11 22:14
fazadef6-May-11 22:14 
AnswerRe: license for the installation Pin
ambarishtv7-May-11 2:51
ambarishtv7-May-11 2:51 
GeneralRe: license for the installation Pin
Pravin Patil, Mumbai8-May-11 21:59
Pravin Patil, Mumbai8-May-11 21:59 
GeneralRe: license for the installation Pin
ambarishtv8-May-11 22:47
ambarishtv8-May-11 22:47 
AnswerRe: license for the installation Pin
Pravin Patil, Mumbai8-May-11 21:59
Pravin Patil, Mumbai8-May-11 21:59 
GeneralRe: license for the installation Pin
ambarishtv8-May-11 22:35
ambarishtv8-May-11 22:35 
Questioncontrolling the AND gate with c# Pin
aeman6-May-11 22:11
aeman6-May-11 22:11 
AnswerRe: controlling the AND gate with c# Pin
Luc Pattyn7-May-11 2:18
sitebuilderLuc Pattyn7-May-11 2:18 
AnswerRe: controlling the AND gate with c# Pin
PIEBALDconsult7-May-11 3:31
mvePIEBALDconsult7-May-11 3:31 
GeneralRe: controlling the AND gate with c# Pin
aeman7-May-11 4:15
aeman7-May-11 4:15 
GeneralRe: controlling the AND gate with c# Pin
PIEBALDconsult7-May-11 4:53
mvePIEBALDconsult7-May-11 4:53 
GeneralRe: controlling the AND gate with c# Pin
Luc Pattyn7-May-11 5:34
sitebuilderLuc Pattyn7-May-11 5:34 

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.