[Solved] Regex to match integers, decimals and fractions [duplicate]

Give this one a shot: (\d+[\/\d. ]*|\d) http://regex101.com/r/oO9yI9 In the future, I’d suggest making your question more clear so we can actually understand what you’re trying to do — provide inputs, expected outputs, and include the programming language you’re using. vb.net is PCRE compliant, so you should be able to use this: Dim regex As … Read more

[Solved] How to create a log file in c# for windows application? [closed]

I would be doing you a disservice to give you “code for logging”, but I can point you towards the File class, which contains useful methods for writing text to a file. Since you specify no other needs, I suspect it will suffice. File http://msdn.microsoft.com/en-us/library/system.io.file.aspx solved How to create a log file in c# for … Read more

[Solved] Trim HashSet

“Better” is arguable, but you could use the built-in method UnionWith and some LINQ for a nice one liner to replace your foreach. Think of it as the closest equivalent to an AddRange, except with the restrictions of a set of course. values.Clear(); values.UnionWith(_values.Select(x => x.Trim())); 2 solved Trim HashSet

[Solved] joins on multiple keys in linq [closed]

Try code like this using System.Collections.ObjectModel; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Text.RegularExpressions; namespace ConsoleApplication57 { class Program { static void Main(string[] args) { int employeeId = 113; List<E_JOURNAL> employee = E_JOURNAL.journals.Where(x => x.JOURNALID == employeeId).ToList(); var results = (from j in employee join s in E_ABSENCE.absenses on j.JOURNALID equals s.JOURNALID orderby … Read more

[Solved] C# program closes immediately on friend’s PC [closed]

The destination folder is not set, so you can have problems with the starting directory or the working directory, as well as access rights, especially under Windows 10 even with an administrator user. This may raise an exception and immediately close the console. You should use a folder in the user area as a target, … Read more

[Solved] System.IndexOutOfRangeException: index was outside the bounds of the array c#… the code is attached below. kindly help me out here [duplicate]

System.IndexOutOfRangeException: index was outside the bounds of the array c#… the code is attached below. kindly help me out here [duplicate] solved System.IndexOutOfRangeException: index was outside the bounds of the array c#… the code is attached below. kindly help me out here [duplicate]

[Solved] Need help regarding very basic issue about .Net program execution flow and basic oops related [closed]

when we run application from IDE then how compiler come into scene to compile our program The IDE starts the compiler and passes it your program. The compiler is another program. It doesn’t need special invocation. You can do it yourself without an IDE by just calling csc.exe directly. and after then how program start….how … Read more

[Solved] Thread.Sleep without freezing UI for Framework 2.0

It seems I was getting this Not Responding on my program, because the other thread I had, that was running constantly, didn’t had any Sleep in it, and was running as fast as possible, thus making the program Not Responding and using up to 13% of the CPU… A simple Thread.Sleep(10); fixed everything solved Thread.Sleep … Read more

[Solved] Go back to second foreach loop

You can use break. It breaks the loop you are in right now. Plus, in your condition you should use else if rather than multiple if. foreach (var pair in firstStrings) { foreach (var pair2 in secondStrings) { if (secondStrings.ContainsKey(pair.Key)) { LogMessage( pair.Value + ” <———-> ” + pair2.Value + ” On Line ” + … Read more