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.85k stars 536 forks source link

CS0120 #3008

Closed randomusert closed 2 weeks ago

randomusert commented 2 weeks 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 2 weeks ago

what are you trying to do?

randomusert commented 2 weeks ago

Clear The screen

zarlo commented 2 weeks ago

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

randomusert commented 2 weeks ago

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