Fetstil Fetstil Kursiv Understrykning linje färgläggning tabellverk Punktlista Nummerlista Vänster Centrerat högerställt Utfyllt Länk Bild htmlmode
  • Forum & Blog
    • Forum - översikt
      • .Net
        • asp.net generellt
        • c#
        • vb.net
        • f#
        • silverlight
        • microsoft surface
        • visual studio .net
      • databaser
        • sql-server
        • databaser
        • access
        • mysql
      • mjukvara klient
        • datorer och komponenter
        • nätverk, lan/wan
        • operativsystem
        • programvaror
        • säkerhet, inställningar
        • windows server
        • allmänt
        • crystal reports
        • exchange/outlook
        • microsoft office
      • mjukvara server
        • active directory
        • biztalk
        • exchange
        • linux
        • sharepoint
        • webbservers
        • sql server
      • appar (win/mobil)
      • programspråk
        • c++
        • delphi
        • java
        • quick basic
        • visual basic
      • scripting
        • asp 3.0
        • flash actionscript
        • html css
        • javascript
        • php
        • regular expresssion
        • xml
      • spel och grafik
        • DirectX
        • Spel och grafik
      • ledning
        • Arkitektur
        • Systemutveckling
        • krav och test
        • projektledning
        • ledningsfrågor
      • vb-sektioner
        • activeX
        • windows api
        • elektronik
        • internet
        • komponenter
        • nätverk
        • operativsystem
      • övriga forum
        • arbete karriär
        • erbjuda uppdrag och tjänster
        • juridiska frågor
        • köp och sälj
        • matematik och fysik
        • intern information
        • skrivklåda
        • webb-operatörer
    • Posta inlägg i forumet
    • Chatta med andra
  • Konto
    • Medlemssida
    • Byta lösenord
    • Bli bonsumedlem
    • iMail
  • Material
    • Tips & tricks
    • Artiklar
    • Programarkiv
  • JOBB
  • Student
    • Studentlicenser
  • KONTAKT
    • Om pellesoft
    • Grundare
    • Kontakta oss
    • Annonsering
    • Partners
    • Felanmälan
  • Logga in

Hem / Forum översikt / inlägg

Posta nytt inlägg


från C# till VB

Postades av 2006-11-27 10:55:54 - Sead Travancic, i forum asp.net generellt, Tråden har 2 Kommentarer och lästs av 418 personer

Nån som kan översätta det här till VB??


// Find the people who were born today
List<ProfileCommon> FindBirthDayPeople()
{
// Use a generic list of people
List<ProfileCommon> birthdayPeople = new List<ProfileCommon>();

// Get all profile objects
ProfileInfoCollection profiles = ProfileManager.GetAllProfiles();

// Go through the profiles
foreach (ProfileInfo info in profiles)
{
// We need to turn a ProfileInfo into a ProfileCommon
// to access the properties to do the search
ProfileCommon userProfile = ProfileCommon.Create(info.UserName);

// If the birthday matches
if (userProfile.BirthDate.Day == DateTime.Today.Day &&
userProfile.BirthDate.Month == DateTime.Today.Month)
{
// Add them to our list
birthdayPeople.Add(userProfile);
}
}

return birthdayPeople;
}


Svara

Sv: från C# till VB

Postades av 2006-11-27 12:05:19 - Per Hultqvist

Jag gör ett försök direkt ifrån huvudet :-)

// Find the people who were born today
Public Function FindBirthDayPeople() as List(of ProfileCommon)
  // Use a generic list of people
  Dim birthdayPeople as new List(of ProfileCommon)

  // Get all profile objects
  Dim profiles as ProfileInfoCollection = ProfileManager.GetAllProfiles();

  // Go through the profiles
  for each info as ProfileInfo in profiles
    // We need to turn a ProfileInfo into a ProfileCommon 
    // to access the properties to do the search
    dim userProfile as ProfileCommon = ProfileCommon.Create(info.UserName);
    
    // If the birthday matches
    if userProfile.BirthDate.Day = DateTime.Today.Day AND _
      userProfile.BirthDate.Month = DateTime.Today.Month)
      // Add them to our list
      birthdayPeople.Add(userProfile);
    End If
  Next

  Return birthdayPeople;
End Function


Svara

Sv:från C# till VB

Postades av 2006-11-27 12:54:35 - Sead Travancic

tackar...

Ska testa sökning med profiles....


Svara

Nyligen

  • 09:09 Vill du köpa medicinska tester?
  • 12:47 Vem beviljar assistansen – kommune
  • 14:17 Någon med erfarenhet av hemstädnin
  • 14:14 Bör man använda sig av en båtförme
  • 14:12 Finns det någon intressant hundblo
  • 14:25 Tips på verktyg för att skapa QR-k
  • 14:23 Tips på verktyg för att skapa QR-k
  • 20:52 Fungerer innskuddsbonuser egentlig

Sidor

  • Hem
  • Bli bonusmedlem
  • Läs artiklar
  • Chatta med andra
  • Sök och erbjud jobb
  • Kontakta oss
  • Studentlicenser
  • Skriv en artikel

Statistik

Antal besökare:
Antal medlemmar:
Antal inlägg:
Online:
På chatten:
4 569 170
27 953
271 705
4 047
0

Kontakta oss

Frågor runt konsultation, rådgivning, uppdrag, rekrytering, annonsering och övriga ärenden. Ring: 0730-88 22 24 | pelle@pellesoft.se

© 1986-2013 PelleSoft AB. Last Build 4.1.7169.18070 (2019-08-18 10:02:21) 4.0.30319.42000
  • Om
  • Kontakta
  • Regler
  • Cookies