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
N

Nissim Salomon

@Nissim Salomon
About
Posts
49
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • dll loading?
    N Nissim Salomon

    Hi I think that you are searching for the Assembly.Load method that load an assembly for dynamic invocation.

    C# question

  • How to set an item in a object's property(of array type) using Reflection
    N Nissim Salomon

    Hi Before you can set the SomeFieldinAccount1Class property/field value you need to intialize / create the element at position 0

    objTempType.P1[0] = new Account1();

    C# csharp data-structures tutorial

  • hard disk serial no
    N Nissim Salomon

    Hi Try the following link that discribe exacly what you want How to Retrieve the REAL Hard Drive Serial Number[^]

    C# database help

  • Linq on Collection of Objects
    N Nissim Salomon

    Hi Try the Hands on lab of the C# 3.0 at the following link http://www.google.co.il/search?hl=iw&q=hands+on+lab+c%23&meta=&aq=f&oq=[^]

    C# csharp database linq

  • Trouble installing Windows Service on different computer
    N Nissim Salomon

    Hi I suggest to install the service manually in order to understand if the problem cause by the installation program

    C# csharp help visual-studio workspace

  • How can i??
    N Nissim Salomon

    Hi when you create a class that inherit from another class you must specify the base class type, this is the solution for your question.

    class Base
    {
        public Base()
        {
    
        }    
    }
    
    class Derieved : Base
    {       
        public string GetPerentName()
        {
            return typeof(Base).Name;
        }
    
        public Base GetPerentObject()
        {
            return (Base)this;
        }
    }
    
    C# question

  • The "Create GUID" tool is disable in my Visual Studio 2005 IDE.
    N Nissim Salomon

    Hi Download it form the following link http://www.microsoft.com/downloads/details.aspx?familyid=94551f58-484f-4a8c-bb39-adb270833afc&displaylang=en[^]

    C# visual-studio help csharp question

  • Read specific lines from txt file and write them to another file
    N Nissim Salomon

    While you are writing a line to the output file manage a counter that will be the limit size of the output file when the counter as reach the limit close the stream and open a new for a new file

    C# question data-structures json tutorial

  • [Message Deleted]
    N Nissim Salomon

    Hi try the following: http://www.pluralsight.com/community/blogs/dbox/archive/2005/07/18/13377.aspx[^]

    C#

  • Read specific lines from txt file and write them to another file
    N Nissim Salomon

    Hi Why not writing the line to the new file ?? at the moment you decide to keep this line. The array is not a very good solution because you need to parse the stream again in order to go back and forward. (you need to keep the postion of the stream not the line No) I think a good solution to your problem can be: 1.open the file 2.read line 3.if the line is to be saved -> process the line (if you need) 4.save the line in the output text file 5.read the next line.

    C# question data-structures json tutorial

  • basic questions about enum
    N Nissim Salomon

    1.you are right the all purpose of enum is to give you the ability to use some logical const names insetd of numbers for example enum Days { Sat = 1, Sun, Mon, Tue, Wed, Thu, Fri } vs 1,2,3,4,5,6,7 there for it is not wise to override the enum consts using numbers if the enum was declared use it, specially if you need to cast it in order to use numbers. 2.Please read the "using flags attribute" in the msdn article.

    C# visual-studio com tools tutorial question

  • XMLSerializer
    N Nissim Salomon

    1.The XML Serializer creates an XML serialization assembly per type that you are trying to Serialize\DeSerialize. you can increase performance using precompiled serialization assembly that you are creating using the sgen.exe utility. 2.Sorry but i dont have a clue for this one.

    C# visual-studio com sysadmin xml json

  • basic questions about enum
    N Nissim Salomon

    Hi In the MSDN enum was declare as follow "The enum keyword is used to declare an enumeration, a distinct type consisting of a set of named constants called the enumerator list" 1. you need to understand that at the bottem line there is a native variable like int or short that can hold other values. for example: Days d = (Days)int.MaxValue; 2. "Assigning additional values new versions of enums, or changing the values of the enum members in a new version, can cause problems for dependant source code. It is often the case that enum values are used in switch statements, and if additional elements have been added to the enum type, the test for default values can return true unexpectedly." in case that you are using flags for bitwaise operation, if one or more enum value was changed you need to update your program to prevent unwanted if results

    C# visual-studio com tools tutorial question

  • Sql Severs on the network
    N Nissim Salomon

    Hi You can use one of the following options: 1. use the GetDataSources method that belong to the SqlDataSourceEnumerator class like the following: DataTable datatable1 = SqlDataSourceEnumerator.Instance.GetDataSources(); 2.use the EnumRegisteredServers method tht belong to the SmoApplication.SqlServerRegistrations class for furture instruction serch for smo objects in google

    C# database sysadmin

  • Sqlserver Triggers
    N Nissim Salomon

    Hi Use the DB triggers (INSERT, UPDATE) in order to log the changes that occur on the table, then use that log todo what ever you want

    C# database help question

  • Attributes giving problem
    N Nissim Salomon

    Hi I saw from your example that you are using framework 3.0 or above Try using the follwoing code

    List<BugFixAttribute> lst = new List<BugFixAttribute>((IEnumerable<BugFixAttribute> )inf.GetCustomAttributes(typeof(BugFixAttribute), false));

    lst.Sort((a, b) => a.BugID < b.BugID ? -1 : 1);

    C# csharp linq help

  • I need help
    N Nissim Salomon

    Hi try the follwing link: http://www.google.com/search?hl=en&q=Multi+Dimension+Arrays+c%23[^]

    C# csharp help question learning

  • Comparing type
    N Nissim Salomon

    Hi Try using the GetType() method instead of the Type keyword in your code

    C# com testing beta-testing tutorial question

  • function rectification
    N Nissim Salomon

    Hi If you want to return StoredProcedureInformation class instance you need to construct an unstance of this class and return it in your code you construct an array of StoredProcedureInformation and return the array instance.

    C# sharepoint question

  • Being more generic
    N Nissim Salomon

    Hi Try using the following code that use generics in order to construct the desired type sqlcommand

    class Program
    {
    public static T SetupCommand<T>() where T : IDbCommand, new()
    {
    T cmd = new T();
    cmd.CommandText = "SELECT * FROM Test";
    cmd.CommandTimeout = 180;
    return cmd;
    }

        static void Main(string\[\] args)
        {
            
            SqlCommand sqlClientCmd = SetupCommand<SqlCommand>();
            OleDbCommand oleDBCmd = SetupCommand<OleDbCommand>();
        }
    }
    

    -- modified at 6:21 Friday 5th October, 2007

    C# algorithms tutorial
  • Login

  • Don't have an account? Register

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