Mohammad Hamdy Ghanem

Results 45 issues of Mohammad Hamdy Ghanem

I suggest this general solution to the issue in #576: Suppose we have this anonymous type: `Dim a = New With {.x = 1, .y = 2}` I suggest to...

Given this class that implements the IComparable: ```vb.net Class Test Implements IComparable(Of Integer) Public Value As Integer Public Function CompareTo(other As Integer) As Integer Implements IComparable(Of Integer).CompareTo Return Value.CompareTo(other) End...

I suggest a new usage of the CType operator to be used in pattern matching like this: ```VB.NET If CType(Obj, s As String) AndAlso s.Lenght > 0 then End If...

I have a class named MyFlag with some static methods (and other non-static methods). Suppose I am using this code: ```VB.NET Dim flag = MyFlag.X flag += MyFlag.Y flag =...

Suppose we have this function: ```VB.NET Function Foo() As List(Of Integer) Foo = New List(Of Integer) Foo.Add(1) Foo.Add(2) End Function ``` I suggest to allow use `New` in the declaration...

Can't we writ this statement: ```VB.NET If pop IsNot Nothing Then pop.IsOpen = False ``` just as: ```VB.NET pop?.IsOpen = False ``` Or at least: ```VB.NET If pop Then pop.IsOpen...

I suggest this syntax for pattern matching in select statements: ``` Select TypeOf t Type x As String Console.WriteLine(x.Length) Type y As Integer Console.WriteLine(y + 1) Type Else Console.WriteLine(t.ToString()) End...

Suppose we have this list: items = new List(Of (Id As Integer, Text As String)() I suggest using this short lambda syntax: `Dim x = items.Select(.Id)` instead of this: `Dim...

I introduced many suggestions to shorten properties syntax, as they are the largest VB blocks. Auto properties are grate, but there are many cases where they can't be used. Here...

Suppose we have this code: ```VB.NET Call Foo( New List(Of Integer) From {1, 2}, New List(Of String) From {"x", "y"} ) ``` Wouldn't it be nice if we just rewrite...