![71751-image.png][1] ![71726-image.png][2] [1]: /api/attachments/71751-image.png?platform=QnA [2]: /api/attachments/71726-image.png?platform=QnA
So not sure if this is a bug, or just something I am doing wrong. I have used partials in the past with other code to split things off that I strip off in production, things like test functions. But never tried with a windows form application. All I would like to do is split the logic into several source files, but it seems visual studio will not allow this, and not sure why. The solution explorer finds this partial as being in the Slice class, but intellisense says everything is not in the current context. It doesn't matter how the properties are set, they are already set to compile. Intellisense cannot see these items as being in scope even though the solution explorer seems to see them fine. Is this supposed to even be possible? I just want to clean up some code between various tabs of my application form to aid in maintaining things. Visual Studio 2017 15.9.33 .NET 4.8.03752 building against .NET 4.7.2 targets.
Smith.ProdReads.cs
using System;
using System.Data;
using System.Windows.Forms;
using System.Data.SqlClient;
using System.Collections.Generic;
namespace Interrogator
{
public partial class Smith
{
AMRFilterString=
}
}
is not able to reference anything in Smith class, doesn't matter if Form inheritance is set or not. Solution Explorer happily sees them as one happy family.
Smith.cs excerpt
namespace Interrogator {
public partial class Smith : Form
{
string AMRFilterString;
//Establish binding source for gridview
private BindingSource AMRbSource;
private SqlDataAdapter ReadData;
private DataTable AMRTable;
public Smith() {}
}
}
Smith.cs has been trimmed, I am not going to provide the full application logic, it is irrelevant and private. But its not clear to me why one part of Visual Studio sees things in scope while another part does not. For now I'll just keep the madness in one source file, but sure would be convenient if this worked. Only think I can think of is tagging everything static, but that seems wrong considering they should alll be seen as part of the same class. Visual Studio seems to treat this as a new form, even though I don't want a new form, just a new source file.