Display the results. To view the results we need to loop through the ScoreDoc array we created in Part3. We do this by iterating through it within a for loop. for (int i = 0; i < hits.Length; i++) { int docId = hits[i].doc; float score = hits[i].score; Lucene.Net.Documents.Document doc = searcher.Doc(docId); string result = […]
Read More →Category: C# Blogs
.NET Core application, where is my EXE, how to publish
Short answer, there isn’t one. When you compile your .NET Core console application for example, you get a DLL. Then you execute it using the DOTNET command from the .NET Core SDK found here. Check out some of my other articles I wrote in regards to ASP.NET Core and .Net Core How to call an […]
Read More →How to call an async method from a console app main method
I find myself needing to look this code snippet up time to time so I thought I’d write it up. Check out some of my other articles I wrote in regards to ASP.NET Core and .Net Core How to call an async method from a console app main method How to deploy a .NET Core […]
Read More →LINQ to XML vs. XML DOM, XMLDOM and LINQ to XML with Lambda Expression
There a numerous reasons why you would need to create an XML file. Configuration settings or using it as a data source are 2 examples. In both cases, you would need to create the XML file. If you have never done it before then the first question is, How do I create, read and modify […]
Read More →Using LINQ to Reflection with Lambda Expressions in C#
I think Lambda expression are cool. Not only are cool, they are pretty powerful and can make your code a lot more readable and compact. I wrote this article here about how to simply use LINQ to Reflection to list the methods and types of an assembly. In this example I will use the same […]
Read More →With-clause referenced two different from-clause elements
I believe if you are getting this error that there is more likely something wrong with your configuration than with NHibernate. I received this error when I wanted to create a nested join between 2 unrelated tables. Something like this in HQL: [sourcecode language=”sql” padlinenumbers=”true” autolinks=”false” gutter=”false” toolbar=”false”] select tbl.CODE, av1.NUM, al1.CODE from TABLE tbl […]
Read More →NHibernate MultiQuery and MultiCriteria unsupported Databases – Oracle and DB2
One of the better capabilities of NHibernate that I have recently found was the ability to group together queries on the client and execute them using only a trip to the database. What I have recently found, is that, as of writing this article and using NHibernate version 3.0 Beta 1, only SQL Server and […]
Read More →Action Delegate and Task Parallelism in C#
I wrote a WPF program recently that contained 2 tree views which were dynamically created, in part, by data located on a database. Initially, I had the creation of the tree views in my Windows_Loaded method, executing the build one after the other. The performance was ok, it took about 1.8 to 2 seconds for […]
Read More →Create a .NET Core 2 application on Linux with Visual Studio Code
The plan is to work some with Linux and I have chosen Ubuntu 16.04 LTS because this, AFAIK, is the flavor which Azure App Service Linux containers runs, see more about that here. I built my Ubuntu work station, by downloading the ISO from the Ubuntu site here and burning it to a DVD. Yes, […]
Read More →What do C# values look like in WinDbg
One of the important areas you need to master when analyzing memory dumps is to recognize patterns that are normal and not normal. You can only come to those conclusions after looking at many, many, many, many memory dumps and either remembering or taking notes on how a process looks when all is ok, so […]
Read More →