My question is to how to split into multiple files a method containing an override?
I understand that this is not possible with partial.
In my code, I have too much lines in this method. I code on the QuantConnect platform that limits the size of one file, and I reach this limit.
public partial class TestAlgo : QCAlgorithm
{
public override void OnData(Slice slice) // Name OnData can't be modified.
{
Indices:
{
//First Indices
}
{
//Second Indices
}
...
}
}
Unfortunately, this is not possible. You should refactor your code so that you split your method into multiple methods instead, and then you could use
partial, though I'm still not sure why you'd want to do that rather than refactoring complex code into multiple classes.