A namespace cannot directly contain members such as field and methods.

hi there. i had this issue since a while now and i dont know how to fix it. can anybody please help me or send the correct code? ive searched the whole internet but didnt found anything. im new to coding.

csharp
using System;
using UnityEngine;

namespace VLB
{
[Serializable]
public struct MinMaxRangeFloat
{
[SerializeField]
private float m_MinValue;

[SerializeField]
private float m_MaxValue;

public float minValue => 0f;
public float maxValue => 0f;
public float randomValue => 0f;
public Vector2 asVector2 => default(Vector2);

public float GetLerpedValue(float lerp01)
{
return 0f;
}

public MinMaxRangeFloat(float min, float max)
{
}
}
}

This is a problem called “scope”. You can’t just define stuff anywhere you want, it’s important to know where it goes and put it there.

Further, when posting code you should use code blocks so we can actually read your code.