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
M

mabrahao

@mabrahao
About
Posts
39
Topics
15
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • how to preg_replace the last comma?
    M mabrahao

    what is the regex to replace only the last comma, using preg_replace? Thanks

    Linux, Apache, MySQL, PHP question regex tutorial

  • string formate
    M mabrahao

    You should replace commas to spaces and String.Format is uppercase in the S

    C#

  • instantiating a generic object [modified]
    M mabrahao

    Thanks a lot, it was missing "Test,"

    C# question database sysadmin

  • instantiating a generic object [modified]
    M mabrahao

    but the T class is a non-abstract and has no constructor parameter

    C# question database sysadmin

  • instantiating a generic object [modified]
    M mabrahao

    i got this msg: Error 800 'T' must be a non-abstract type with a public parameterless constructor in order to use it as parameter 'T' in the generic type or method

    C# question database sysadmin

  • instantiating a generic object [modified]
    M mabrahao

    Hi guys, i have a method like this: public List listObj() {} and i want to instantiate a object with this type T, i tried this: T obj = new T(); doesnt work, so i tried T obj = default(T); and doesnt work too... how can i instantiete this obj??? Thanks. The code: public class MysqlDireto { private static MysqlDireto _instancia; private static string connectionstring = "Server=;Database=;Uid=;Pwd=;"; public static MysqlDireto Instancia { get { return _instancia ?? (_instancia = new MysqlDireto()); } } public List<T> ObterLista<T>() { MySqlConnection conn = new MySqlConnection(connectionstring); string comando = "SELECT * FROM " + typeof(T).Name; MySqlCommand cmd = new MySqlCommand(comando, conn); conn.Open(); MySqlDataReader leitor = cmd.ExecuteReader(); List<T> lista = new List<T>(); if (leitor.HasRows) { while (leitor.Read()) { T obj = Foo<T>(); obj.GetType().GetProperty("Id").SetValue(obj, leitor["Id"], null); lista.Add(obj); } } conn.Close(); return lista; } public T Foo<T>() where T : class, new() { return new T(); } }

    modified on Wednesday, June 8, 2011 2:11 PM

    C# question database sysadmin

  • get real html code from webbrowser
    M mabrahao

    I think it exists, firebug shows the final HTML, but ok... i will look for DOM. Thanks anyway!! Marcus.

    C# question javascript html

  • get real html code from webbrowser
    M mabrahao

    Thanks, but webbrowser1.DocumentText doesnt work, it gets: <html> <body> Document.write("Text"); </body> </html> =/ i dont know what to do anymore.

    C# question javascript html

  • get real html code from webbrowser
    M mabrahao

    Hi, how can i get the real html code in a webbrowser object??? a mean, if the page has the following code: Document.write("Text"); i wanna get the code after the js runs. what i want is to get this: Text thanks, Marcus.

    C# question javascript html

  • using npgsql
    M mabrahao

    Hi, i am making an app and im using postgre, so im making my connection with npgsql, but i need to make a report and im trying to use crystalreport, but i have no idea how to use crystal + npgsql. Can anyone help me please? thanks a lot

    C# help tutorial question

  • call an opener form method
    M mabrahao

    solved... just removed the : this(). anyway... thank you very much

    C# question

  • call an opener form method
    M mabrahao

    ok, almost there... i got only one more problem... i need to pass 2 param to my form2. ex: From2 form = new Form2(id, this);

    C# question

  • call an opener form method
    M mabrahao

    i've used From2 f = new Form2(ref Form1 this); but didnt work.

    C# question

  • call an opener form method
    M mabrahao

    hi guys, i have a form that needs to call a function on his opener form. How can i do this? ex: form1 opens form2, and form2 needs to call a method in form1. thanks a lot!

    C# question

  • desable a menustrip item
    M mabrahao

    ok, thank you very much!!! it was a very good answer

    C# question

  • desable a menustrip item
    M mabrahao

    thank you vary much... works great!!!

    C# question

  • desable a menustrip item
    M mabrahao

    but how? thanks

    C# question

  • desable a menustrip item
    M mabrahao

    hi guys, i'm looking for all over the internet i a just cant find it, i am almost giving up... So, how can i desable a menustrip item from another form. ex: i have a form1(mdi) and i open inside it a form2, and from this form2, i wanna desable a form1 menustrip item. thanks sorry for the bad english.

    C# question

  • begintrans, commit and rollback
    M mabrahao

    hi, im doing a app on vb6 and i have a doubt about the transaction. how can i know if the transaction is "open" or not. thanks, Marcus

    Visual Basic question

  • change .net framework
    M mabrahao

    Ok, thank you anyway, i will try again here... hugs

    Visual Basic csharp dotnet help 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