<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://mars.merhot.dk/w/index.php?action=history&amp;feed=atom&amp;title=6237_Programmering_II_%28Csharp%29_Agenda%2FStatic_properties</id>
		<title>6237 Programmering II (Csharp) Agenda/Static properties - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://mars.merhot.dk/w/index.php?action=history&amp;feed=atom&amp;title=6237_Programmering_II_%28Csharp%29_Agenda%2FStatic_properties"/>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=6237_Programmering_II_(Csharp)_Agenda/Static_properties&amp;action=history"/>
		<updated>2026-06-10T20:49:00Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.29.0</generator>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=6237_Programmering_II_(Csharp)_Agenda/Static_properties&amp;diff=31062&amp;oldid=prev</id>
		<title>Orso: moved 6237 Programmering II Static properties to 6237 Programmering II (Csharp) Agenda/Static properties</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=6237_Programmering_II_(Csharp)_Agenda/Static_properties&amp;diff=31062&amp;oldid=prev"/>
				<updated>2015-10-07T10:20:19Z</updated>
		
		<summary type="html">&lt;p&gt;moved &lt;a href=&quot;/w/index.php/6237_Programmering_II_Static_properties&quot; class=&quot;mw-redirect&quot; title=&quot;6237 Programmering II Static properties&quot;&gt;6237 Programmering II Static properties&lt;/a&gt; to &lt;a href=&quot;/w/index.php/6237_Programmering_II_(Csharp)_Agenda/Static_properties&quot; title=&quot;6237 Programmering II (Csharp) Agenda/Static properties&quot;&gt;6237 Programmering II (Csharp) Agenda/Static properties&lt;/a&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr style='vertical-align: top;' lang='en'&gt;
				&lt;td colspan='1' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='1' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 10:20, 7 October 2015&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan='2' style='text-align: center;' lang='en'&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Orso</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=6237_Programmering_II_(Csharp)_Agenda/Static_properties&amp;diff=30876&amp;oldid=prev</id>
		<title>Orso: /* Static properties */</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=6237_Programmering_II_(Csharp)_Agenda/Static_properties&amp;diff=30876&amp;oldid=prev"/>
				<updated>2015-09-29T13:33:17Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Static properties&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;' lang='en'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 13:33, 29 September 2015&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l43&quot; &gt;Line 43:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 43:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	Person.PersonList.Add(p3);&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	Person.PersonList.Add(p3);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}&amp;lt;/source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}&amp;lt;/source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;6237 Programmering II&lt;/ins&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Csharp&lt;/del&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Orso</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=6237_Programmering_II_(Csharp)_Agenda/Static_properties&amp;diff=30610&amp;oldid=prev</id>
		<title>Orso: Created page with &quot;===Static properties===   I klasser kan man vælge at lave metoder og variable static. En statisk variable er fælles for alle instanser af klassen. Her ses f.eks. klassen Person...&quot;</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=6237_Programmering_II_(Csharp)_Agenda/Static_properties&amp;diff=30610&amp;oldid=prev"/>
				<updated>2015-09-22T18:15:26Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;===Static properties===   I klasser kan man vælge at lave metoder og variable static. En statisk variable er fælles for alle instanser af klassen. Her ses f.eks. klassen Person...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;===Static properties===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I klasser kan man vælge at lave metoder og variable static. En statisk variable er fælles for alle instanser af klassen. Her ses f.eks. klassen Person der har en statisk variabel PersonList.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=csharp&amp;gt;&lt;br /&gt;
class Person&lt;br /&gt;
{&lt;br /&gt;
	//Properties&lt;br /&gt;
	private String navn;&lt;br /&gt;
	public String Navn&lt;br /&gt;
	{&lt;br /&gt;
		get { return navn; }&lt;br /&gt;
		set { navn = value; }&lt;br /&gt;
	}&lt;br /&gt;
	.....&lt;br /&gt;
&lt;br /&gt;
	public static List&amp;lt;Person&amp;gt; PersonList;&lt;br /&gt;
&lt;br /&gt;
	//Konstruktør&lt;br /&gt;
	public Person(String navn, String email)&lt;br /&gt;
	{&lt;br /&gt;
		if (PersonList == null) PersonList = new List&amp;lt;Person&amp;gt;();&lt;br /&gt;
		this.navn = navn;&lt;br /&gt;
		this.email = email;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Listen tilgåes således. Bemærk at der skrives Person.PersonList ikke p1.PersonList.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=csharp&amp;gt;&lt;br /&gt;
static void Main(string[] args)&lt;br /&gt;
{&lt;br /&gt;
	Person p1 = new Person(&amp;quot;Tommy&amp;quot;, &amp;quot;tommys@mail.dk&amp;quot;);&lt;br /&gt;
	Person p2 = new Person(&amp;quot;Jens&amp;quot;, &amp;quot;jens@mail.dk&amp;quot;);&lt;br /&gt;
	Person p3 = new Person(&amp;quot;Holger&amp;quot;, &amp;quot;holgers@mail.dk&amp;quot;);&lt;br /&gt;
	Person.PersonList.Add(p1);&lt;br /&gt;
	Person.PersonList.Add(p2);&lt;br /&gt;
	Person.PersonList.Add(p3);&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Csharp]]&lt;/div&gt;</summary>
		<author><name>Orso</name></author>	</entry>

	</feed>