CosmosOS / Cosmos

Cosmos is an operating system "construction kit". Build your own OS using managed languages such as C#, VB.NET, and more!
https://www.goCosmos.org
BSD 3-Clause "New" or "Revised" License
2.94k stars 552 forks source link

CS0120 #3008

Closed randomusert closed 7 months ago

randomusert commented 7 months ago

Area of Cosmos - What area of Cosmos are we dealing with?

Cosmos.Hal.TextScreenBase.Clear()

Expected Behaviour - What do you think that should happen?

not give an error

Actual Behaviour - What unexpectedly happens?

it gives CS0120

Reproduction - How did you get this error to appear?

add Cosmos.HAL.TextScreenBase.Clear()

Version - Were you using the User Kit or Dev Kit? And what User Kit version or Dev Kit commit (Cosmos, IL2CPU, X#)?

userkit

spesific error

Severity Code Description Project File Line Suppression State Details Error CS0120 An object reference is required for the non-static field, method, or property 'TextScreenBase.Clear()' tinos_version2 C:\Users\Kone\Desktop\tinos_version2\tinos_version2\Kernel.cs 17 Active

zarlo commented 7 months ago

what are you trying to do?

randomusert commented 7 months ago

Clear The screen

zarlo commented 7 months ago

then you want Console.Clear() https://learn.microsoft.com/en-us/dotnet/api/system.console.clear?view=net-8.0

randomusert commented 7 months ago

I didn't know that .net has that bult in