So i work on a Program which needs to get an File-Explorer, on which I am currently working on. However, my problem is that I always get the error "Method must have a return type" in line 174 (Line 7 counted from bottom to top) and I've tried everything but I can't fix the error.
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace WpfApp1
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
private DriveInfo drive;
public MainWindow()
{
InitializeComponent();
}
--------------------- unnecessary code cutted ----------------------------
void item_Expanded(object sender, RoutedEventArgs e)
{
var item = (TreeViewItem)sender;
if (this.HasDummy(item))
{
this.Cursor = Cursors.Wait;
this.RemoveDummy(item);
this.ExploreDirectories(item);
this.ExploreFiles(item);
this.Cursor = Cursors.Arrow;
}
}
public MainWindow()
{
InitializeComponent();
this.LoadDirectories();
}
}
}