---
title: "Property Get?"
type: "forum-thread"
url: "https://www.webforum.nu/amne/asp/129668-property-get"
topic: "ASP"
topic_url: "https://www.webforum.nu/amne/asp"
author: "Jesper T"
published: "2005-06-08T12:37:33.000Z"
updated: "2005-06-08T13:59:13.000Z"
replies: 1
views: 192
page: 1
pages: 1
language: "sv-SE"
site: "webForum — webforum.nu"
rights: "Upphovsrätten till varje inlägg tillhör dess författare."
attribution: "Citera som: webForum, https://www.webforum.nu/amne/asp/129668-property-get"
---

# Property Get?

## #1 — Jesper T, 2005-06-08T12:37Z

Varför använda Property Get när man kan vara utan (i detta fall)?

```
Class a

	Private u

	Public Property Let arg(s)
		u = s
	End Property
	
	Private Property Get arg()
		arg = u
	End Property
	
	Public Function func()
		func = "a ret: "& arg()
	End Function
	
End Class

Class b

	Private u

	Public Property Let arg(s)
		u = s
	End Property
	
	Public Function func()
		func = "b ret: "& u
	End Function
	
End Class
```

Permalänk: https://www.webforum.nu/p/129668

## #2 — Guffa, 2005-06-08T13:59Z

Det beror på ifall du vill att metoden func() ska påverkas av eventuella förändringar du gör på egenskapen arg, eller om den ska använda det värde som lagras internt.

Permalänk: https://www.webforum.nu/p/1625518

---

Tråden på webben: https://www.webforum.nu/amne/asp/129668-property-get
