Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
F

Fakher Halim

@Fakher Halim
About
Posts
10
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • A matter of coupling
    F Fakher Halim

    Thanks!! it should be just a typo! :-D

    Fakher Halim

    Design and Architecture csharp com architecture help tutorial

  • A matter of coupling
    F Fakher Halim

    Pete, May be I was not very clear:(( . Actually not only I agreed with your opinion, but I meant to add into your concise reply by informing Lelie who wrote "I'd heard of Dependency Inversion but not Dependency Injection", that is why I referred to a link! Perhaps it was"Inversion of Control" :( that was intended.

    Fakher Halim

    modified on Thursday, July 17, 2008 4:00 PM

    Design and Architecture csharp com architecture help tutorial

  • A matter of coupling
    F Fakher Halim

    Leslie/Pete, May be you can solve it by using Dependency Injection framework like Spring.NET. I would suggest a good article Dependency Injection Frameworks - Part 1 - Introduction. That way, the instantiation is taken out of Factories into app.config mappings. If, however, you even want to decouple your data access layer from the changes in database tables and schemas, you may abstract those dependencies away using Entity Framework, example is at Modeling Enterprise Applications with Entity Framework

    Fakher Halim

    Design and Architecture csharp com architecture help tutorial

  • Linq to Entity Framework Example has been added!
    F Fakher Halim

    Thanks for your encouragement! :)

    Fakher Halim

    LINQ csharp visual-studio linq com beta-testing

  • searching big text
    F Fakher Halim

    First you need to first split the forSearch into an Array using space as delimiter, then use LINQ to merge your sw1, sw2 as where clauses to filter out whatever is needed

    Fakher Halim

    LINQ question csharp html linq com

  • Linq to Entity Framework Example has been added!
    F Fakher Halim

    A fully finctional Linq to Entity Framework Example now is available at Modeling Enterprise Applications with Entity Framework for those who have upgraded Visual Studio 2008 with SP1 (Beta 1) :rolleyes:

    Fakher Halim

    LINQ csharp visual-studio linq com beta-testing

  • Simulation of VB6 Style Default properties
    F Fakher Halim

    I agree. It is just to illustrate how to create a new class instance out of a string. Of course it doesn't have code to add string into an existing instance, nor it has similarity to a VB6 control for that matter. Sure it is a weird syntax -- shocking to any OO person, and that is exactly why I posted this so called VB6 compatibility possibility -- knowing the controversy. Fakher Halim

    C# csharp question

  • Simulation of VB6 Style Default properties
    F Fakher Halim

    Yes, it is absolutely counter intuitive in today's strongly typed world, but sometime you need to address some irrational requirement. Fakher Halim

    C# csharp question

  • Simulation of VB6 Style Default properties
    F Fakher Halim

    Those VB6 developers were INSISTING on not using MyClass.Text and just assigning MyClass directly with a string , as they would do in pre-.NET days The classical example was a Label control, where both of following mean the same: lblEnterName.Caption = "Enter full name" lblEnterName = "Enter full name" Fakher Halim

    C# csharp question

  • Simulation of VB6 Style Default properties
    F Fakher Halim

    Many developers have been trying to figure out a way to simulate VB6 style default property in C#. I thought of using operator overloads first. Since assignment operator doesn't overload, I used implicit to type cast. MyClass c="Test String";//A constant string directly assigned to any class instance. Console.WriteLine(c); //print it to verify It is implemented in the following class using implicit type casting operator class MyClass{//Has Text Property, as default //Ability to assign strings directly to .Text Property of MyClass -- Like VB6 public static implicit operator MyClass(string s) { MyClass c=new MyClass(); c.Text=s; return c; } private string _Text; public string Text{ get{return _Text; } set { _Text = value; } } public override string ToString() { return Text;} } Does someone know a simpler way? Fakher Halim

    C# csharp question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups