i have two projects in one solution:
: (Solution)Myapplication
: project 1
ReadMsgtxt.cs
: project 2
bin
debug
Msg.txt
now i want to read "Msg.txt" file from "ReadMsgtxt.cs". Main parent project is "project1" but i want read file from parent project to child project. I don't want hardcode the path. please suggest using c# code to retrieve the file
Now i an using this code in ReadMsgtxt.cs but it is taking current file path i.e., project1 path
System.IO.File.ReadAllText(AppDomain.CurrentDomain.BaseDirectory + "\\Msg.txt")