How to declare a relative path in C#
<p>I have this solution in visual studio</p>

<pre><code>MicrosoftVisualStudioSolution //being click to open solution
MainfolderSolution
-Model
---Sample.model
-Scripts
---Index.js
-Contents
---text.json
</code></pre>

<p>Code from my Sample.model</p>

<pre><code>    {
        try
        {
            string temp = Path.Combine(Directory.GetCurrentDirectory(), @"..\Contents\text.json"); 
            string Data = File.ReadAllText(temp);
        }
        catch
        {
            return null;
        }
    } 
</code></pre>

<p>My problem is that it can't find text.json</p>